我有一个中心箱,它有一些NFS坐骑。我正在试图找出这些NFS文件系统被挂载的原因。我发现如果我将/usr/sbin/automount重命名为其他名称,在重新启动该框后,这些NFS将不会被挂载。因此,我可以肯定,自动上装这些NFS。
但是/etc/auto.master没有显示任何关于NFS的信息。我想知道如何自动安装哪个NFS可能会有什么可能性?
$ cat /etc/auto.master
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#
/misc /etc/auto.misc
#
# NOTE: mounts done from a hosts map will be mounted with the
# "nosuid" and "nodev" options unless the "suid" and "dev"
# options are explicitly given.
#
/net -hosts
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master但是在/var/run下,我发现了如下一些东西:
prw------- 1 root root 0 Jan 20 04:36 autofs.fifo-bldmnt
prw------- 1 root root 0 Jan 20 04:36 autofs.fifo-blr发布于 2014-01-20 13:55:30
文件auto.master通常包含以下一行:
/net -hosts一个较老的备选方案是(曾经):
/net /etc/auto.net第一行是引用文件/etc/host的所谓的内置映射,第二个例子是所谓的程序映射(通常是一个简单的shell脚本),它可能更好地向您解释自动化器是如何工作的。
我猜您的系统上有一些符号链接,指向/net下远程服务器上的某些路径(或者在/etc/auto.master的副本中使用任何autofs路径前缀而不是/net )。
每当访问/net锚点下面的路径时,自动侦听器就会捕捉到这种尝试,并尝试在那里挂载引用的目录。
假设自动侦听器正在运行,并且在网络中存在一个名为HostA的NFS服务器,它在他的/etc/exports文件中导出一个名为Documents的目录。然后使用以下命令
cd /net/HostA/Documents可以在那里自动挂载此远程目录,而无需在NFS客户端上进行进一步配置。
与其他服务一样,automount使用命名管道进行内部进程间通信。因此,问题中提到的/var/run/中的文件是在真正挂载任何东西之前由自动程序创建的。
在早期版本的autofs包中,/etc/auto.net是一个脚本,它调用命令showmount或kshowmount --no-headers -e NFS-SERVER,以从NFS服务器获取导出文件系统的列表。
客户机上的showmount显示服务器端文件/etc/exports中定义的目录。此文件可能包含目录/。但出于安全考虑,这从来不是我见过的任何Linux发行版的默认版本。
发布于 2014-01-21 09:22:33
我们有一些RHEL6系统,它们应该在某种程度上类似于centOS机器。我们的服务器-设置在/etc/导出中
/data/nfs <IP-Range>(rw,sync,insecure,root_squash,no_subtree_check,fsid=0)
/data/nfs/data <IP-Range>(rw,nohide,sync,insecure,root_squash,no_subtree_check)在客户端上,设置位于/etc/fstab中。
<Hostname of NFS-Server>:/data /data/<mount-directory> nfs4 rw 0 0https://serverfault.com/questions/568504
复制相似问题