How to share a remote disk using nfs and portmap in linux

Source: Internet
Author: User

In linux, the nfs and portmap services share remote disks. in linux, you can mount a remote disk to a local directory through the nfs and portmat services. The method is as follows:
1. start nfs and portmap service nfs startservice portmap start on the source server and add the nfs and portmap services to the self-starting service www.2cto.com 2 through ntsysv. edit the configuration file/etc/exports/data 10.0.0.6 (rw, no_root_squash) on the source server. Meaning: the IP address assigned to the shared/data directory is 10.0.0.6: /the directory shared by the data Server 10.0.0.6 allows this ip address to access the directory rwxxxxxxx with the permission to read www.2cto.com 3. restart nfs service nfs restart on the source server after configuration. start the portmap service portmap start 5 on the client. mount the remote folder mkdir/datamount-t nfs 10.0.4.6:/data on the client Note that the mount-t nfs:-t format is nfs10.0.4.6:/data server address + shared directory, you can also use the machine name to replace the/data local mount directory www.2cto.com 1. you must enable the portmap service on both the server and client. RCP is used for communication between nfs mount and umount. 2. If the client portmap is not started, it will be very slow during mount and eventually fail. Umount is successful even if the local portmap is disabled. Www.2cto.com 3. After the mounting is complete, the nfs still works normally after the portmap on the server end is stopped, but the umout accounting prompt is not found/mounted or server not reachable. Restarting the server's portmap does not help. 4. If the portmap on the server is restarted, the nfs will also be restarted. Otherwise, the nfs operation will still be abnormal. 5. if the nfs on the server is disabled (the IP address is accessible), the client will not be able to use umount-f/nfs. When the server crashes, umount-f/nfs may fail. You can use umount-l/nfs. final suggestion: 1. to use NFS, you must use portmap. NFS relies heavily on portmap, so do not try to stop it (portmap ). 2. When the umount/nfs partition is not available, try to use umount-f/nfs. Generally, the operation is successful. 3. If umount-f/nfs cannot be umount, try umount-l/nfs. umount-l as the final umount. Author: jinshoucai

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.