recentpopularlog in

Copy this bookmark:

to read

bookmark detail

bash - Linux Shell Script: How to detect NFS Mount-point (or the Server) is dead? - Stack Overflow
read -t1 < <(stat -t "$mountpoint" 2>&-)
if [[ -n "$REPLY" ]]; then
echo "NFS mount stale. Removing..."
umount -f -l "$mountpoint"

"read -t1" construct reliably times out the subshell if stat command hangs for some reason.
bash  shellscripting  nfs  networkedfilesystem  sysadmin  maybesolution 
may 2015 by kme
view in context