Introduction to NFS in Linux

Source: Internet
Author: User
Article Title: Introduction to NFS in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

For example, the NFS server IP address is 192.168.1.11.

Check whether the nfs-utils and portmap software packages are installed)

Rpm-qa | grep nfs-utils rpm-qa | grep portmap

Create an NFS shared directory and Set permissions

Mkdir/share

Chmod 755/share

NFS server configuration file/etc/exports

Format:

   <共享目录> [Client 1 access permission] [client 2 access permission]

   <共享目录2> [Client 1 access permission] [client 2 access permission]

For example:/share 192.168.1.12 (sync, rw, no_root) * (sync, ro)

Client: You can specify an IP address or ** it indicates all or 192.168.1. * similar conditions

Permission: rw read/write permission

Ro read-only

Sync data is synchronously written to memory and Hard Disk

Async data is temporarily stored in the memory instead of directly stored in the hard disk.

No_root_squash: the user who logs on to the NFS host and uses the shared directory. If the root identity is used, the user has the root permission.

Root_squash is used to log on to the NFS host. If it is a root user, the identity is compressed to an anonymous user.

All_squash will be compressed into anonymous users when any user logs on.

Start NFS service portmap restart

Service nfs restart

Client mount: mount 192.168.1.11:/share-t nfs/mnt

Unmount: umount-a or umount/mnt

If the client starts mounting, add a line in the/etc/fstab file of the client.

192.168.1.11:/share/mnt nfs ults 0 0

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.