NFS 挂载有效,但 autofs 因远程 IO 错误而失败

NFS 挂载有效,但 autofs 因远程 IO 错误而失败

NFS 服务器是 AIX v7.2,客户端是 Ubuntu Server 20.10。问题如下。

结果showmount -e tsm2.montanavendor.com

Export list for tsm2.montanavendor.com:
/export/nim/lpp_source/720303_1913                devsap01_bkup.montanavendor.com
/export/nim/spot/720303_1913/720303_1913_spot/usr devsap01_bkup.montanavendor.com
/export/nim/scripts/devsap01_bkup.script          devsap01_bkup.montanavendor.com
/nim                                              172.23.4.18,172.23.4.27,172.23.4.79,192.168.0.202
/export/nim/spot/720400_1937/720400_1937_spot/usr prdsap01_bkup.montanavendor.com
/export/nim/lpp_source/720400_1937                prdsap01_bkup.montanavendor.com
/adminBkup                                        172.23.4.18,172.23.4.27,unificntl_bkup.montanavendor.com
/tmp1                                             172.23.4.27,172.23.4.18,unificntl_bkup.montanavendor.com

sudo mount -t nfs -o nfsvers=3 tsm2.montanavendor.com:/tmp1 /nfs/tmp1工作原理和df结果:

tsm2.montanavendor.com:/tmp1           4096   257      3840   7% /nfs/tmp1

卸载后/nfs/tmp1我尝试使用自动挂载程序:

$ cat /etc/auto.master
/nfs    /etc/auto.nfs
/mnt    /etc/auto.mnt

$ cat /etc/auto.nfs
adminBkup   -rw tsm2.montanavendor.com:/adminBkup
tmp1        -rw tsm2.montanavendor.com:/tmp1

然后sudo automount -f -v

Starting automounter version 5.1.6, master map /etc/auto.master
using kernel protocol version 5.05
mounted indirect on /nfs with timeout 300, freq 75 seconds
mounted indirect on /mnt with timeout 300, freq 75 seconds

尝试访问后,结果如下:

attempting to mount entry /nfs/tmp1
>> mount.nfs: Remote I/O error
mount(nfs): nfs: mount failure tsm2.montanavendor.com:/tmp1 on /nfs/tmp1
failed to mount /nfs/tmp1

这是来自另一个会话的:

$ ls -l /nfs/tmp1
ls: cannot access '/nfs/tmp1': No such file or directory

这看起来像是所有权或权限问题。我在服务器目录上设置了 777 并重新导出。我尝试/nfs/tmp1在启动自动挂载之前删除该目录,但没有成功。我想我忽略了一些显而易见的东西,但我看不到它。

我可以将其设为静态挂载,但我更喜欢自动挂载程序,因为它不受服务器重启的影响。

相关内容