xfs
[Top] [All Lists]

Re: xfs_repair on root filesystem

To: Massimiliano Adamo <maxadamo@xxxxxxxxx>
Subject: Re: xfs_repair on root filesystem
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Fri, 14 Mar 2008 09:24:32 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1205496795.16829.6.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <1205496795.16829.6.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Thunderbird 2.0.0.12 (X11/20080226)
Massimiliano Adamo wrote:
> Hi all,
> 
> I have seen that it's possible to run xfs_check on filesystems mounted
> read-only, but in order to use xfs_repair the filesystem must be
> unmounted.
> I can't even imagine how to run xfs_repair on root filesystem, without
> booting from a live cd.
> 
> Do you think it would be possible to implement xfs_repair on 'ro'
> filesystem, or on filesytems frozen with xfs_freeze?

Like this, from the xfs_repair manpage? :)

       -d     Repair dangerously.  Allow  xfs_repair
              to  repair  an  XFS filesystem mounted
              read only. This is typically done on a
              root  fileystem from single user mode,
              immediately followed by a reboot.

For an added bonus, you could create a "rescue initrd" which contains
repair.  I always thought this would be a neat trick.

> The other question would be about the possibility to shrink a XFS
> filesystem... but as I can see this is a work already in progress.

It is (slowly) in progress I think, and something of a FAQ by now :)

-Eric

> cheers
> Massimiliano Adamo
> 
> 


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