小编Cha*_*ang的帖子

挂载到 autofs 挂载的 NFS 导出显示空内容

我使用 autofs 在文件夹 /mnt/iso 中挂载一些 iso 文件:

Fedora-13-x86_64-DVD.iso
Fedora-14-x86_64-DVD.iso
Fedora-15-x86_64-DVD.iso
Run Code Online (Sandbox Code Playgroud)

autofs 工作正常,我可以看到 iso 文件的内容:

# ls /mnt/iso/fedora.13/
# ls /mnt/iso/fedora.14/
# ls /mnt/iso/fedora.15/
Run Code Online (Sandbox Code Playgroud)

完成 autofs 测试后。我强制卸载所有iso文件夹:

# umount -l /mnt/iso/*
Run Code Online (Sandbox Code Playgroud)

然后我在 /etc/exports 中导出 /mnt/iso:

/mnt/iso        192.168.0.0/24(ro,insecure,crossmnt,all_squash)
Run Code Online (Sandbox Code Playgroud)

NFS 服务也运行良好。我可以通过 nfs 客户端从另一台机器挂载 /mnt/iso:

# mount -t nfs4 <nfs-server>:/mnt/iso /mnt
Run Code Online (Sandbox Code Playgroud)

我可以在 /mnt/ 文件夹中看到所有 iso 挂载:

# ls /mnt
dr-xr-xr-x 15 nobody nobody 4096 2011-06-11 10:23 .
drwxr-xr-x 24 root   root   4096 2011-02-08 08:45 ..
drwxr-sr-x  7 nobody nobody 4096 2010-05-13 09:06 fedora.13
drwxr-sr-x …
Run Code Online (Sandbox Code Playgroud)

linux nfs autofs automount

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

autofs ×1

automount ×1

linux ×1

nfs ×1