HostOnNet Blog

Target is busy

Looking for Linux Server Admin or WordPress Expert? We can help.

When i try to un mount a disk, i get error

root@hon-pc-01:~# umount /backup
umount: /backup: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)
root@hon-pc-01:~# 

I need to find which program is using the drive, stop it before i can un mount the drive.

To do this, run

fuser -vm /path/to/folder_or_drive

fuser find program using a file

In this case, i have swap file running form /backup drive. I put swap on backup so i can share IO load with a hard disk that normally have 0 use other than when i run backup. You can disable the swap with command

root@hon-pc-01:~# swapoff /backup/swapfile
root@hon-pc-01:~# 

Some other useful commands are

lsof | grep /home

or

lsof +f -- /home

Will list all open application and files in /home directory. Change home with whatever path you need to find.

Posted in Linux

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.