Creation of NFS Network File system

Source: Internet
Author: User

NFS (Network File System) a network file system that allows computers in a network to share resources across TCP/IP networks. In an NFS application, a local NFS client application can transparently read and write to files located on the remote NFS server, just as you would access a local file. taking CentOS6 as an example


For service-side

Preferred check if the corresponding software is installed

Rpm-aq nfs-utils Rpcbind

Install NFS if not installed install it here with Yum

Yum Groupinstall "NFS fileserver"-y

Preferred to start the RPC service after installation is complete

/etc/init.d/rpcbind start

Start the NFS service

/etc/init.d/nfs start

Set up RPC and NFS services on boot

Chkconfig NFS Onchkconfig Rpcbind on

Edit NFS Profile Share out folder

Vim/etc/exports

#shrared/data Test

/data 192.168.0.0/24 (Rw,sync)

#共享/data folder in 192.168.0.0/24 segment RW is read and Write permission sync is writing data from buffer to disk


Check the shared results

SHOWMOUNT-E localhost

Export list for localhost:

/data 192.168.0.0/24


OK then configure the/data folder permissions to NFS read and write

Chown-r Nfsnobody.nfsnobody/data


For client

Client needs to install RPC service

Yum Install Rpcbind-y

Start the RPC and set the boot-on self-boot

/etc/init.d/rpcbind Startchkconfig Rpcbind on

Check to see if the server can be accessed

SHOWMOUNT-E 192.168.0.151

Export list for 192.168.0.151:

/data 192.168.0.0/24


Mount NFS to a local folder

Mount-t NFS 192.168.0.151:/data/share

Execute df-h and you'll see.

Filesystem Size used Avail use% mounted on

/dev/sda3 18G 2.1G 15G 13%/

Tmpfs 491M 0 491M 0%/dev/shm

/DEV/SDA1 190M 98M 83M 55%/boot

192.168.0.151:/data 72G 1.4G 67G 3%/share


This article is from the "crazy Young と Small World" blog, please be sure to keep this source http://hoshizora.blog.51cto.com/11765507/1825288

Creation of NFS Network File system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.