Linux Tutorials - Herong's Tutorial Examples - v5.34, by Dr. Herong Yang
Unreachable Remote File Systems
Provides a tutorial example on how to resolve the unreachable remote file system problem, which causes all related commands to hang, using the lazy un-mount command 'umount -l'.
Sometimes, a file system mounted from a remote server may become unreachable. This will cause any command that uses the remote file system to hang with no way to break it.
1. "df" command hangs if a remote file system is unreachable with no way to break it.
herong$ df (no response) Ctr-C (no response) ...
2. "kill" command is not able to terminate it.
(log in from another session) herong$ ps -efl | grep "df" 0 D herong 16317 16237 0 80 0 - 1833 smb2_r 11:11 pts/0 df herong$ kill -9 16317 herong$ ps -efl | grep "df" 0 D herong 16317 16237 0 80 0 - 1833 smb2_r 11:11 pts/0 df
3. Force un-mount command "umount -f" may give you an error:
herong$ mount | grep share //192.168.1.100/share on /mnt/share type cifs ... herong$ sudo umount -f /mnt/share umount: /mnt/share: target is busy.
4. Only the Lazy un-mount command may resolve the problem.
herong$ sudo umount -f -l /mnt/share herong$ mount | grep share //192.168.1.100/share on /mnt/share type cifs ... (3 minutes later) herong$ mount | grep share (no output) herong$ df (list of remaining file systems)
Note that the lazy un-mount command "umount -l" detaches the remote file system from the file hierarchy now. It may not be able to clean up all references to the un-mounted file system.
Table of Contents