Mount points are the foundation of Linux filesystem access, yet many sysadmins overlook mount monitoring until a stale NFS mount causes a cascading service failure. Understanding your mount landscape — from local block devices to remote NFS/CIFS shares — is essential for maintaining reliable server infrastructure.
Understanding Linux Mounts
Every accessible filesystem on Linux is attached to the directory tree via a mount point. The kernel maintains the mount table in /proc/mounts, which reflects the current state of all mounted filesystems.
# View all mounts
mount
cat /proc/mounts
# Tree view with findmnt
findmnt
# Filter by filesystem type
findmnt -t ext4,xfs
findmnt -t nfs,nfs4,cifs
Network Mount Monitoring
Network mounts (NFS, CIFS, GlusterFS, SSHFS) add complexity because they depend on network connectivity and remote server availability:
# Mount NFS share
mount -t nfs server:/export/data /mnt/data
# Mount CIFS/SMB share
mount -t cifs //server/share /mnt/share -o username=admin
# Check NFS mount status
nfsstat -m
Stale Mount Detection
Stale mounts occur when the remote server becomes unreachable while the mount is still registered. A stale NFS mount can cause processes to hang indefinitely:
# Test for stale mount (times out if stale)
timeout 5 stat /mnt/nfs-share
# Force unmount stale mount
umount -l /mnt/stale-share # Lazy unmount
umount -f /mnt/stale-share # Force unmount
Automated Mount Monitoring
pip install dargslan-mount-monitor
dargslan-mount report # Full mount report
dargslan-mount network # Network mounts only
dargslan-mount stale # Detect stale mounts
dargslan-mount usage # Disk usage per mount
Best Practices
- Use
softandtimeooptions for NFS mounts to prevent indefinite hangs - Monitor mount health in your alerting system
- Use
autofsfor on-demand mounting of network shares - Regularly check for stale mounts, especially after network maintenance
- Document all mounts in
/etc/fstabwithnofailfor non-critical mounts
Download our free Mount Point Monitoring Cheat Sheet for essential mount commands. Browse our Linux & DevOps eBooks for comprehensive filesystem knowledge.