Deleted Snapshots Still Appear in DF Output

Learn how to resolve an issue where deleted snapshots still appear in DF output with "stale file handle".

Symptom: Previously deleted snapshots still appear in df output with the message stale file handle.

Cause: When you use an NFSv3 client to perform operations such as ls, du, or find on the snapshot directory, the service automatically exports the directory. The client uses nfs_d_automount() to detect and mount the directory. After the directory is detected and mounted the first time, the client mounts the directory automatically.

If you then delete the snapshot, the mount becomes disconnected. The client still holds an active reference to the snapshot, but can no longer access the snapshot itself, so it reports stale file handle.

Solution: Manually unmount the snapshot. This might require using the -f flag in the umount command. For example:
sudo umount -f 10.x.x.x:/fs-export-path /mnt/yourmountpoint
Note

If the unmount command fails with the message device busy, see Cannot Unmount a File System: Device is Busy for a solution to this problem.