Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. 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.

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
1  
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. –  sidewaysmilk Aug 12 '10 at 18:26

1 Answer 1

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. –  sidewaysmilk Nov 13 '12 at 22:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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