An NFS client shows `df` hanging forever, and the shell becomes unusable.
IntermediateTroubleshootingDisk space, inodes and filesystems
Answer
Likely causes → An NFS server is unreachable and the mount is hard, so statfs() blocks in D state.
Diagnose →
mount -t nfs,nfs4
df -h -x nfs -x nfs4 # works without touching NFS
rpcinfo -t nfsserver nfs 4 ; showmount -e nfsserver
ps -eo pid,stat,cmd | awk '$2 ~ /D/'
Fix → Restore the server or network. If the server is gone for good, umount -f -l /mnt/share.
Prevent → Use autofs for rarely used shares; monitor NFS servers; avoid NFS mounts on paths that system tools scan.
More on Disk space, inodes and filesystems
Writes fail with `No space left on device`, but `df -h` shows the filesystem is only 40% used.Intermediate`df -h` shows `/` at 100%, but `du -sh /` only adds up to 12 GB on a 50 GB disk.Intermediate`du` and `df` disagree by 20 GB and `lsof +L1` shows nothing. What else could hide the space?AdvancedA cron job that runs `rm /var/spool/app/*` fails with `/bin/rm: Argument list too long`.Beginner`touch /data/test` returns `touch: cannot touch '/data/test': Read-only file system`.BeginnerAfter a power failure, mounting an XFS volume fails with `mount: /data: wrong fs type, bad option, bad superblock on /dev/sdb1`.Intermediate