Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

Also, I can confirm that there is no occurrence in the output of mount or in /etc/mtab of the volume's device or mount point.

share|improve this question
Does "mount" make sure that the volume REALLY is unmounted? – Janne Pikkarainen Aug 12 '10 at 17:23
Good question! I should have specified. I'll update my question. – Justin Force Aug 12 '10 at 18:26

It may be that /etc/mtab has gotten out of sync, especially if root is readonly. /proc/mounts reflects the true kernel view of what filesystems are mounted.

(As an aside, fsck.xfs does nothing at all (see the manpage) and xfs_repair -n is a better choice for a readonly check than xfs_check is.)

share|improve this answer
Thank you for your contribution! Unfortunately, I don't work at this company anymore so I can't test it. – Justin Force Nov 13 '12 at 22:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .