Linux Tutorials - Herong's Tutorial Examples - v5.45, by Herong Yang
Unreachable Remote File Systems
This section 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
Cockpit - Web Portal for Administrator
"df" - Display Free Space of File System
Mount USB Drive as File System
"dd" - Copy Data from/to Storage Devices
Use "dd" Command to Test I/O Speed
"du" - Display Disk Usage of Directories
Mount Windows NTFS File System
Access Persmissions on "ntfs-3g" File System
Reformat NTFS Partition into EXT4 Partition
Mount NFS (Network File System) on macOS
/etc/mtab and /etc/fstab Files
►Unreachable Remote File Systems
SELinux - Security-Enhanced Linux
SSH Protocol and ssh/scp Commands
Software Package Manager on CentOS - DNF and YUM
vsftpd - Very Secure FTP Daemon