最近在我的测试服务器上发现了这些行:
<some IPV4>:/zebra on /zebra type nfs (rw,relatime,vers=3,rsize=262144,wsize=262144,namlen=255,hard,nolock,proto=tcp,port=2051,timeo=600,retrans=2,sec=sys,mountaddr=10.126.84.153,mountvers=3,mountport=5004,mountproto=udp,local_lock=all,addr=10.126.84.153)
<some IPV4>://zebra on /zebra type nfs4 (rw,relatime,vers=4.0,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=172.17.1.20,local_lock=none,addr=10.48.28.115)
Run Code Online (Sandbox Code Playgroud)
现在我有几个问题:
为什么 Linux 允许从同一挂载点挂载不同的导出
例如,如果我这样做,ls /zebra将列出哪些出口?
umount例如,我可以从特定服务器吗10.126.84.153?
AFAIK 你不能。最新的挂载将首先被卸载
# mkdir testmount
# mount --bind /bin/ testmount/
# mount --bind /usr/bin/ testmount/
# mount |grep testmount
/bin on /testmount type none (rw,bind)
/usr/bin on /testmount type none (rw,bind)
# umount testmount/
# mount |grep testmount
/bin on /testmount type none (rw,bind)
# umount testmount/
# mount |grep testmount
#
Run Code Online (Sandbox Code Playgroud)