Article Title: NFS configuration and deployment 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.
NFS is a good shared storage system, but its performance is not very good under high load.
10.0.0.1-NFS Server
10.0.0.2-NFS Client
On NFS Server:
Shared Directory:/nfspool
NFS running user: nfsnobody
# Mkdir/nfspool
# Vi/etc/exports
/Nfspool 10.0.0.2 (rw, async, anonuid = 65534, anongid = 65534)
# Mkdir-p/nfspool
# Chown nfsnobody: nfsnobody/nfspool
# Chown-R nfsnobody: nfsnobody/nfspool /.
# Service portmap start
# Service nfslock start
# Service nfs start
On the NFS Client:
Remote NFS shared directory mount point:/usr/local/nfs
# Service portmap start
# Mkdir/usr/local/nfs
# Chown nfsnobody: nfsnobody/usr/local/nfs
# Chmod 777/usr/local/nfs
# Mount-t nfs-o soft, intr, bg, timeo = 50 10.0.0.1:/nfspool/usr/local/nfs
# Vi/etc/fstab
10.0.0.1:/nfspool/usr/local/nfs soft, intr, bg, timeo = 50 0 0
Note:
1. exports parameter description
Rw: read/write mode;
Async: asynchronous disk read/write;
Anonu (g) id: Specifies the anonymous user uid/gid used by NFS during operations
2. NFS management commands
Showmount-e execute this command on the NFS Server to display all the shared volumes on the NFS Server;
Showmount-e 10.0.0.1 execute this command on the NFS Client to display all the shared volumes on the NFS Server;
Export-av exports all volumes according to/etc/exports;
Export-rv re-export all the volumes, add new projects in/etc/exports, delete nonexistent projects, and update changed projects;
[1] [2] Next page