xfs
[Top] [All Lists]

Re: How to fsck read-only-mounted root filesystem?

To: linux-xfs@xxxxxxxxxxx
Subject: Re: How to fsck read-only-mounted root filesystem?
From: "Jesse W. Asher" <jasher1@xxxxxxxxxxxxxxx>
Date: Wed, 05 Dec 2001 11:59:57 -0500
References: <Pine.LNX.4.30.0112050442330.30553-100000@xxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
Sorry 'bout that!  I misunderstood and thought it was complaining 
because it was read only.

In this case there are a couple of alternatives.  The easiest would be 
to boot off of a CD or floppy.  Probably the CD would be best because 
the floppy is bound to use the root filesystem off the hard drive and 
you might still run into the same problem.  Another alternative is to do 
a network boot, but if you don't already have that set up it will be a 
long and exhausting process to get it set up just to repair the filesystem..

In short, there doesn't seem to be a painless way to do this.  The CD 
isn't likley to have XFS support built in.  If you built the XFS stuff 
as modules, you could possibly boot off the CD and then load the XFS 
modules using insmod.  

Also, if you haven't tried the remount option I originally mentioned, 
you may want to try it anyway even though the utilities complain about 
touching a mounted filesystem.  I don't always trust error messages to 
be accurate and there is a possibility that it doesn't like the fact 
that it is read-only rather than just being mounted.  You won't know for 
sure until you try and that is an easy thing to try.  Just a thought.

I seem to remember there being instructions on how to build an XFS-based 
root filesystem and there are likely to be clues for fixing your current 
situation in that documentation.  May be worthwhile checking out to see 
what you can gleen from various documents....

Dan Hollis wrote:

>i dont think you read my post very closely... ;P
>
>xfs_check/xfs_repair refuse to touch any FS if it's mounted, even if it's
>mounted read-only...
>
>-Dan
>
>On Wed, 5 Dec 2001, Jesse W. Asher wrote:
>
>>You have to remount it on the fly.  Look at the man page for "mount" and
>>look at the remount option.  You should be able to do something like
>>"mount -o remount,rw /"  or some such.  I'm not sure this is the exact
>>syntax, but you should be able to figure it out.....
>>
>>Dan Hollis wrote:
>>
>>>How can one xfs_check/xfs_repair a root filesystem?
>>>
>>>If you try this, even from singleuser mode where / is mounted read-only,
>>>the utilities whinge about the filesystem being mounted, and refuse to
>>>touch the disk at all.
>>>
>>>I have an xfs filesystem with some corruption from (I think) bad dma.
>>>There's some directories which xfs won't let me remove. And with no way
>>>to repair the filesystem :-( :-( this sux.
>>>
>>>Seems to me that repairing a read-only mounted filesystem should be
>>>allowed?!? e2fsck allows it.
>>>
>>>-Dan
>>>
>>
>

-- 
Jesse W. Asher

"They that can give up essential liberty to purchase a little temporary
safety, deserve neither liberty or safety."  - Benjamin Franklin




[[HTML alternate version deleted]]


<Prev in Thread] Current Thread [Next in Thread>