![如何识别现有的 NFS 或 CIFS 挂载是硬挂载还是软挂载?](https://linux22.com/image/1091756/%E5%A6%82%E4%BD%95%E8%AF%86%E5%88%AB%E7%8E%B0%E6%9C%89%E7%9A%84%20NFS%20%E6%88%96%20CIFS%20%E6%8C%82%E8%BD%BD%E6%98%AF%E7%A1%AC%E6%8C%82%E8%BD%BD%E8%BF%98%E6%98%AF%E8%BD%AF%E6%8C%82%E8%BD%BD%EF%BC%9F.png)
我在操作系统上安装了两个 NFS 共享,还有一个 CIFS 共享。fstab 文件中的上述挂载均未在各自的挂载选项中明确提及软挂载或硬挂载。
那么我如何才能知道它们是软挂载还是硬挂载呢?
答案1
检查相应的手册页。man mount.nfs
指着man 5 nfs
详细信息如下:
soft / hard Determines the recovery behavior of the NFS client after
an NFS request times out. If neither option is
specified (or if the hard option is specified), NFS
requests are retried indefinitely. If the soft option
is specified, then the NFS client fails an NFS request
after retrans retransmissions have been sent, causing
the NFS client to return an error to the calling
application.
因此,除非另有规定,否则 NFS 的默认设置是困难的。
soft
(default) The program accessing a file on the cifs mounted file
system will not hang when the server crashes and will return errors
to the user application.
CIFS 的默认设置是软的。