NFS报错问题解决

将服务器B(10.75.50.120)的目录挂载到服务器A上。

sudo mount -t nfs 10.75.50.120:/opt/share/gaojing/snapdragon-auto-gen3-hqx-1-2-1_hlos_dev_qnx /home/gaojing/workspace/qnx_nfs/

报错:

mount.nfs: access denied by server while mounting 10.75.50.120:/opt/share/gaojing

检查权限:

 sudo vim /etc/exports/opt/share  *(insecure,rw,sync,no_root_squash)
/opt/work  *(rw,sync,no_root_squash)

调试:

mount -e localhost
mount -e 10.75.50.120

报错:

clnt_create: RPC: Program not registered

解决:

systemctl restart nfs-kernel-server
systemctl restart rpcbind

重启nfs和rpcbind(最终有效)。

调试记录:

sudo systemctl status nfs-kernel-server
service nfs-kernel-server status
sudo systemctl start rpcbind.service
sudo service nfs-kernel-server restart
sudo vi /etc/exports

其他错误信息:
//客户端没有安装nfs服务

mount.nfs: remote share not in 'host:dir' format
mount.nfs: requested NFS version or transport protocol is not supported

调试信息:

gaojing@bs158:/mnt$ ps aux|grep nfs
root     25867  0.0  0.0      0     0 ?        I<   16:33   0:00 [nfsiod]
gaojing  31263  0.0  0.0  14436   964 pts/0    S+   17:18   0:00 grep --color=auto nfs

gaojing@bs158:/mnt$ sudo service nfs-kernel-server restart
Failed to restart nfs-kernel-server.service: Unit nfs-kernel-server.service not found.

gaojing@bs158:/mnt$ sudo service nfs-common restart 
Failed to restart nfs-common.service: Unit nfs-common.service is masked.

gaojing@bs158:/mnt$ sudo service nfs start
Failed to start nfs.service: Unit nfs.service not found.

安装nfs:

sudo apt-get install nfs-kernel-server
gaojing@bs158:/mnt$ ps aux|grep nfs
root     25867  0.0  0.0      0     0 ?        I<   16:33   0:00 [nfsiod]
root     32235  0.0  0.0      0     0 ?        S    17:21   0:00 [nfsd]
root     32236  0.0  0.0      0     0 ?        S    17:21   0:00 [nfsd]
root     32237  0.0  0.0      0     0 ?        S    17:21   0:00 [nfsd]
root     32238  0.0  0.0      0     0 ?        S    17:21   0:00 [nfsd]
root     32239  0.0  0.0      0     0 ?        S    17:21   0:00 [nfsd]
root     32240  0.0  0.0      0     0 ?        S    17:21   0:00 [nfsd]
root     32241  0.0  0.0      0     0 ?        S    17:21   0:00 [nfsd]
root     32242  0.0  0.0      0     0 ?        S    17:21   0:00 [nfsd]
gaojing  32751  0.0  0.0  14436  1044 pts/0    S+   17:21   0:00 grep --color=auto nfs

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

sunxiaolin2016

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值