Is there any way to check df -k hanging for nfs mount issues?
Make sure following line to /etc/fstab:
nfs-server:/ /mnt nfs4 _netdev,auto 0 0
About _netdev:
where the auto option mounts on startup and the _netdev option can be used by scripts to mount the filesystem when the network is available. Under NFSv3 (type nfs) the _netdev option will tell the system to wait to mount until the network is available. With a type of nfs4 this option is ignored, but can be used with mount -O _netdev in scripts later
Related videos on Youtube
Ezequiel
Updated on September 18, 2022Comments
-
Ezequiel almost 2 years
I am trying to write a script for such failure scenarios.
In a scenario where maybe, if remote connection is lost,
df
waits for the remote server to respond (looks like df is hanging). I know I could do a timeout after waiting for some seconds but is there any other way to check thatdf
is hanging and kill it.Also can I find out which mount point is causing the problem? So that I could try to
unmount
andmount
it again.-
Rahul Patil almost 11 yearswhich version you are using ? there is a bug in nfs 1:1.2.6-3 which makes mount hang when using krb5*.
-