mount命令参数的优化
默认挂载
[root@node1 ~]# mount -o nfsvers=3 192.168.251.116:/test /mnt
[root@node1 ~]# cat /proc/mounts | grep /mnt
192.168.251.116:/test /mnt nfs rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.251.116,mountvers=3,mountport=2049,mountproto=tcp,local_lock=none,addr=192.168.251.116 0 0
可以看到一些默认挂载的参数
添加一些优化参数进行挂载
[root@node1 ~]# mount -o vers=3,async,noatime,nodiratime 192.168.251.116:/test /mnt
介绍一些常见的参数:
ro 只读访问
rw 读写访问
sync 所有数据在请求时写入共享
secure NFS通过1024以下的安全TCP/IP端口发送
insecure NFS通过1024以上的端口发送
wdelay 如果多个用户要写入NFS目录,则归组写入(默认)
no_wdelay 如果多个用户要写入NFS目录,则立即写入,当使用async时,无需此设置。