🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

Linux Mount Point Monitoring: NFS, CIFS, Bind Mounts and Stale Detection

Linux Mount Point Monitoring: NFS, CIFS, Bind Mounts and Stale Detection

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 soft and timeo options for NFS mounts to prevent indefinite hangs
  • Monitor mount health in your alerting system
  • Use autofs for on-demand mounting of network shares
  • Regularly check for stale mounts, especially after network maintenance
  • Document all mounts in /etc/fstab with nofail for non-critical mounts

Download our free Mount Point Monitoring Cheat Sheet for essential mount commands. Browse our Linux & DevOps eBooks for comprehensive filesystem knowledge.

Share this article:
Dargslan Editorial Team (Dargslan)
About the Author

Dargslan Editorial Team (Dargslan)

Collective of Software Developers, System Administrators, DevOps Engineers, and IT Authors

Dargslan is an independent technology publishing collective formed by experienced software developers, system administrators, and IT specialists.

The Dargslan editorial team works collaboratively to create practical, hands-on technology books focused on real-world use cases. Each publication is developed, reviewed, and...

Programming Languages Linux Administration Web Development Cybersecurity Networking

Stay Updated

Subscribe to our newsletter for the latest tutorials, tips, and exclusive offers.