我正在努力让自动挂载按需要工作。
如果我运行以下命令:
sudo mount -t nfs server:/path/to/share /path/to/mount_point
我得到的坐骑看起来很好。
但是,如果我将以下行添加到我的auto_master
:
/path/to/mount_point server:/path/to/share
它创建了挂载点目录,但内容不可见。
当我观察mount
命令的输出时,它们是不同的:
使用第一种(手动安装)方法返回以下条目mount
:
server:/path/to/share on /path/to/mount_point (nfs)
Run Code Online (Sandbox Code Playgroud)使用automount
我得到以下条目返回mount
:
map server:/path/to/share on /path/to/mount_point (autofs, automounted, nobrowse)
Run Code Online (Sandbox Code Playgroud)我假设默认情况下,automount
通过 NFS 挂载,相当于手动挂载。
用于automount
实现(正确工作)手动安装行为的正确方法是什么?
该共享托管在 Linux NIS 域上,我从 Mac(BSD Unix)访问。