之前用的是1.0系统,昨天升级了1.1.8,今天发现之前NFS共享的文件夹全都无法访问了,提示:Permission denied
这是exports内容:
# /etc/exports: the access control list for filesystems which may be exported # to NFS clients. See exports(5). # /fs/1000/nfs *(rw,async,insecure,all_squash,no_subtree_check,insecure_locks,sec=sys,anonuid=1000,anongid=1001,fsid=1000) /fs/1002/nfs *(rw,async,insecure,all_squash,no_subtree_check,insecure_locks,sec=sys,anonuid=1002,anongid=1001,fsid=1002) /vol1/NFSshare/mount/mashibo *(rw,async,no_subtree_check,insecure) /NFSshare/mount/machunjie-c5toqu *.(rw,async,no_subtree_check,insecure) /NFSshare/mount/mashibo-0beuwp *(rw,async,no_subtree_check,insecure) /NFSshare/mount/songchengyuan-3ogg33 *(rw,async,no_subtree_check,insecure)
在其他服务器上也能看到:
root@autodl-202-2:~# showmount -e 10.170.2.148 Export list for 10.170.2.148: /NFSshare/mount/mashibo-0beuwp * /vol1/NFSshare/mount/mashibo * /fs/1002/nfs * /fs/1000/nfs * /NFSshare/mount/songchengyuan-3ogg33 * /NFSshare/mount/machunjie-c5toqu *
我发现只有内部存储的文件夹可以正常访问,比如/vol1/NFSshare/mount/mashibo这个文件夹,其他的外部文件夹全都无法访问,升级系统之前是可以的。
主要是外部磁盘我需要xfs格式,飞牛自带的系统没有这个格式,所以只能挂载外部存储。
刚刚发现了解决方案:
先卸载/NFSshare这个磁盘,此时会自动变为默认的挂载点:/vol00/SEAGATE ST12000NM004J
然后再次卸载,之后,重新sudo mount -a(之前已经在fstab中写入规则了:UUID=84c13981-0780-4f7e-b7b2-6e3896675b9d /NFSshare xfs defaults,usrquota,grpquota,prjquota,nofail,x-systemd.device-timeout=10 0 0)
此时,不知道何种原因,/etc/exports下的自定义配置全部丢失,不过还好,重新填入NFS导出即可~