Implementation of mapping remote disk directory with NSF in Linux


Suppose the source directory is on the machine and the directory is / data

If the client cluster is, you need to transfer the / data directory on the machine to the local / data directory

1. Install NSF and portmap on two machines

yum  install  nfs-utils  portmap

After installation.

2. Modify the / etc / exports file on the machine and add the following

/data/,sync,no_ root_ The host has RW permission on the directory. Other parameters can be viewed in the NSF document, which is not explained here

The NSF and portmap services are then enabled

service rpcbind start
service nfs start

3. Start the NSF and portmap services on the machine, and then mount the remote directory

service rpcbind start
service nfs start

mount -t nfs  /data/

Hang the / data directory above the machine under the / data directory of the local machine

Now you can read and change the / data directory on the machine.

The implementation of using NSF to map remote disk directory in Linux is the whole content shared by Xiaobian. I hope to give you a reference, and I hope you can support developeppaer more.