centos7掛載nas盤報錯信息如下:
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
解決辦法:需要安裝nfs-utls包,並且開啓rpcbind服務。
其中rpcbind是一個RPC服務,主要是在nfs共享時候負責通知客戶端,服務器的nfs端口號的。
命令如下:
# centos 7
yum install nfs-utils
systemctl enable rpcbind
systemctl start rpcbind
systemctl enable nfs-server
systemctl start nfs-server
# 然後可以正常進行掛盤
mount -o nolock -t nfs 172.20.0.1:/infoshare_1t /apps/data/
# 掛盤完成別忘了在/etc/fstab添加配置,否則服務器重新啓動你掛的盤就看不到了,需要重新掛
172.20.0.1:/infoshare_1t /apps/data nfs defaults 0 0