Ubuntu Network File System (NFS)

Source: Internet
Author: User

The Ubuntu Network File System (NFS) aims to allow the system to share directories and files through the network and other machines in the network. Users and programs can access the file system on a remote machine through NFS just like accessing a local file system. NFS can be used in the following scenarios. Because files can be stored elsewhere, you can save local disk space and other users can access them through the network. You can put your home directory on the NFS server, in this way, you do not need to set a home directory for each machine on the network; you can share mobile storage in the network. Run the following command on the terminal to install sudo apt-get install nfs-kernel-server. You can modify the file/etc/exports to add and move the shared directory and its corresponding access permissions, for example,/ubuntu * (ro, sync, no_root_squash)/home * (rw, sync, no_root_squash) You can replace * with the name of the machine you want to share; you should also set the machine name as much as possible, this prevents unwanted machines from accessing the shared file. The client configuration maps the shared directory on the remote machine to a local machine using the mount command. You can run the following command to implement sudo mount example.hostname.com: /ubuntu/local/ubuntu can also replace example.hostname.com with an IP address; mount points to the local directory/local/ubuntu, which should be a security directory, otherwise, the existing files and subdirectories in the directory will change. Invisible, but it can be re-visible after unmount. You can also map the remote shared directory to the local file system by modifying the file/etc/fstab; add the following statement to the file/etc/fstab to achieve the same effect as the above mount command. example.hostname.com:/ubuntu/local/ubuntu nfs rsize = 8192, wsize = 8192, timeo = 14, intr if you encounter problems during the mount process, please check whether the nfs-common package has been installed on your client machine. If not, run the following command to install sudo apt-get install nfs-common.

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.