Results 1 to 4 of 4
I'm trying to run xfs_repair on my filesystem:
Firstly to unmount the fs
Quote:
umount /myfs
umount: /myfs: device is busy
umount: /myfs: device is busy
Quote:
lsof /dev/sda
-show ...
- 03-21-2011 #1Just Joined!
- Join Date
- Jun 2008
- Posts
- 58
umount fails with device is busy
I'm trying to run xfs_repair on my filesystem:
Firstly to unmount the fs
Quote:
umount /myfs
umount: /myfs: device is busy
umount: /myfs: device is busy
Quote:
lsof /dev/sda
-show none ie nothing seems to be 'touching' the disk.
confused why its still showing device is busy
i did a force unmount then
Quote:
#umount -l /dev/sda
but then when I try to run xfs_repair
Quote:
xfs_repair -n /dev/sda, it
xfs_repair: /dev/sda contains a mounted and writable filesystem
fatal error -- couldn't initialize XFS library
lsof /dev/sda
shows nothing ie nothing seems to be 'touching' the disk.
Any thoughts???
Thanks
David
- 03-21-2011 #2Just Joined!
- Join Date
- Feb 2009
- Posts
- 9
Sorry for stating the basics but are you inside the mount at the time you try to umount?
Have you also tried the fuser command?Code:fuser -vm /myfs
- 03-21-2011 #3Just Joined!
- Join Date
- Nov 2007
- Location
- San Diego
- Posts
- 17
You can also check for running processes:
but as chrisstevens mentionedCode:ps -ef |grep myfs
should show you if any files are in use.Code:fuser -vm myfs
Also make your any other terminal sessions are not in any directory on that volume.
- 03-22-2011 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
There are two main reasons why umount will fail with a busy device error.
1. A file is open on the device.
2. A directory is open on the device - this can be due to a shell having cd'd to a directory on the device.
Anyway, this happens to me from time to time because of these two reasons.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote