2

I'm running a fully updated Ubuntu 9.04 "Jaunty" i686 server. I have an single XFS volume in an LVM group called /dev/mapper/vg0-bigthree.

If I boot to single user mode and ensure that the volume is unmounted, I still get the following every time I try to run xfs_check:

$ sudo xfs_check /dev/mapper/vg0-bigthree 
xfs_check: /dev/mapper/vg0-bigthree contains a mounted and writable filesystem

fatal error -- couldn't initialize XFS library

Just to be thorough, I started by trying to run

$ sudo fsck.xfs /dev/mapper/vg0-bigthree 
If you wish to check the consistency of an XFS filesystem or
repair a damaged filesystem, see xfs_check(8) and xfs_repair(8).

before turning to xfs_check.

3

Clearly the fs is un-mounted. It appears as though either autofs or nfs is still holding onto the file system and once they are stopped the check will run.

`service autofs stop`
`service nfs stop`

xfs_check is looking at stale information in /etc/mtab rather than up-to-date information in /proc/mounts.

0

Make sure the filesystem isn't listed in /etc/mtab or /proc/mounts as mounted. (I'm not certain which xfs_check looks for). I've seen this occur in cases where a device wasn't cleanly unmounted.

Not the answer you're looking for? Browse other questions tagged or ask your own question.