Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

closed as too localized by Luis Mar 14 '13 at 17:04

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

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.

share|improve this answer

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.

share|improve this answer

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