NFS configuration file, remember it

Under normal circumstances the windows network shared with samba user LAN network share.
Internet sites for small and medium NFS cluster architecture common back-end data sharing.
Large sites will use more complex Moosefs (mfs) (small files) GlusterFS (large file) FastDFS ( small files). Do it yourself

Three main services rpc.nfs rpcbind rpc

Server

1.

yum install -y nfs-utils

Automatically created nfs-nobody

2. Open the boot join rpcbind nfs open
rpcinfo -p View service nfs rpc registered by the main port of 2049

Configuration file / etc / Exports
/ var / lib / NFS / server configuration Etab

Client CAT / proc / mounts
DF -H sometimes stuck to use the above method

/ etc / exports configuration instructions
directory of the target (rw, all_squash, (async, sync), anonuid = XX, anongid = XX)

 /var/share 192.168.0.*(rw,sync,root_squash)
 /var/share 192.168.0.0/24(rw,sync,all_squash,anonuid=65534,anouid=65535)
useradd -s /sbin/nologin -M

If users do use a visit, just all_squash all users compressed into an anonymous user, and to specify the anonymous user UID GID.
In NFS, the only recognized UID, and the actual name does not matter, but in order to unify, are set to UID and user name as the user
nfs problem
if multiple clients to nfs server co-management of resources, these three uid to be the same, otherwise it will go wrong
all_squash root_squash no_root_squash anonuid = anongid = which is to ensure both consistent

Large concurrent use async normal sync

4.

  exportfs -avr  更新nfs目录   不需要重启服务
  exportfs -avu 关闭nfs    不需要重启服务
  exportfs  查看开启的共享

Client

  1. showmount -e 172.16.1.31  查看server 的共享目录
  2. mount -t nfs 172.16.1.31:/home testnfs
    umount -lf 强制卸载   不建议

    fstab mount 192.168.0.6 / database nfs default 0 0

firewalld need to release three service rpcbind mountd nfs (the pit too!)

NFS optimization
1. Disk RAID card throughput of the bind
2.NFS Exports Configuration
3. Mount commands to optimize
4./etc/sysctl.conf kernel optimization

NFS Limitations
1. single point of failure
2. The performance is limited, but can greatly reduce the NFS cache access
3. plain, non-redundant
high coupling 4, hang directly stuck

Guess you like

Origin blog.51cto.com/14316149/2420892