Umount command
Unpack the file system. Umount [-ahnrvv][-t < file system type >][file system]
Umount can dismount a file system currently attached to a Linux directory.
There was a problem with NFS access on the line, which caused the/data1 directory LS to be out of output and needed to be uninstalled. While the direct uninstall because the directory is being occupied by other processes, can not directly umount, here on the combination of fuser for umount Uninstall.
1. Direct Uninstall
[Root@localhost/]# umount/data1/img
Umount:/data1/img:device is busy
Umount:/data1/img:device is busy
2, the hint is occupied, use force uninstall
[Root@localhost/]# umount-f/data1/img
Umount2:device or resource busy
Umount:/data1/img:device is busy
Umount2:device or resource busy
Umount:/data1/img:device is busy
Note: When forced uninstall with the-f parameter it is generally recommended that you do the following later, in some cases it takes 1-2 minutes to process.
3, the use of umount-f, the problem remains. Using the Fuser command, first confirm that the process is consuming the directory
[Root@localhost/]# fuser-cu/data1/img
/data1/img:1757c (MySQL)
The above view finds that a MySQL user with a PID of 1757 takes up the directory.
4, to confirm that the process of MySQL can kill, you can directly use the Fuser K parameters to kill (also can manually stop 1757 process and then uninstall)
[Root@localhost/]# fuser-ck/data1/img
/data1/img:1757c
Note: Here K is the meaning of kill, be careful to use this parameter before confirming the confirmation.
In addition, when umount an exception, the lsof is often used to specify what processes occupy the file.