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

 About This Book

 Introduction to Linux Systems

 Cockpit - Web Portal for Administrator

 Process Management

 Files and Directories

 Users and Groups

File Systems

 "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

 Mount Windows Shared Folders

 W95 Ext'd (LBA) Partition

 Reformat NTFS Partition into EXT4 Partition

 NFS (Network File System)

 Mount NFS (Network File System) on macOS

 /etc/mtab and /etc/fstab Files

Unreachable Remote File Systems

 Block Devices and Partitions

 LVM (Logical Volume Manager)

 Installing CentOS

 SELinux - Security-Enhanced Linux

 Network Connection on CentOS

 Internet Networking Tools

 SSH Protocol and ssh/scp Commands

 Software Package Manager on CentOS - DNF and YUM

 vsftpd - Very Secure FTP Daemon

 LDAP (Lightweight Directory Access Protocol)

 Administrative Tasks

 References

 Full Version in PDF/EPUB