How to track where umount: /custom: target is busy ?

Lets see how to track where a partition is busy when it does not allow us to umount.

 

I. Error Message

[root@ngelinux001 ~]# umount /custom
umount: /custom: target is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))

 

II. Check which processes using this mount point.

[root@ngelinux001 ~]# fuser -cu /custom

In case any of the processes are using this partition, we can check the processes and kill those in case those are not system impacting.

 

III. Check the partition mount details.

[root@ngelinux001 ~]# df -h /custom
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 480G 11G 470G 3% /custom
[root@ngelinux001 ~]#

[root@ngelinux001 ~]# mount | grep -i custom
/custom/Incredibuild/cache/ib_cache.storage on /ib/mnt/fscache type ext4 (rw,data=ordered)
/dev/sda2 on /custom type xfs (rw,relatime,attr2,inode64,noquota)

 

IV. Check out the other partition mounted from this partition.

$ df -h /ib/mnt/fscache/
Filesystem Size Used Avail Use% Mounted on
/dev/loop0 9.8G 37M 9.2G 1% /ib/mnt/fscache

$ df -h /proc
Filesystem Size Used Avail Use% Mounted on
proc 0 0 0 - /ib/mnt/fscache/proc

Interesting, in this system, /proc is mounted from a file inside the partition.

Hence we can’t umount this.

In case we will try to do lazy umount then the system will hang, and rebooted.

 

V. Solution

Hence the quick way to do this is, comment this partition in fstab file and reboot the system.

Now umount and change the partition and then boot it back.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments