xfs
[Top] [All Lists]

Re: Repair XFS

To: "linux-xfs@xxxxxxxxxxx" <linux-xfs@xxxxxxxxxxx>, "Norman Zhang" <nzhang@xxxxxxxxxxxxxxx>
Subject: Re: Repair XFS
From: "Michael Sinz" <Linux@xxxxxxxx>
Date: Wed, 10 Dec 2003 17:29:08 -0500
In-reply-to: <003e01c3bf68$6b8afa40$0716a8c0@xxxxxxxxxxxxxxxxxxxx>
Priority: Normal
Reply-to: "Michael Sinz" <Linux@xxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
On Wed, 10 Dec 2003 13:56:09 -0800, Norman Zhang wrote:

>>> I'm seeing some irregulars halts on one of my XFS volume (/srv). I
>>> can only use umount -l to dismount the volume or do a hot reboot.

>> fsck.xfs is a no-op.  What you need to do is use xfs_repair on the
>> partition while it is unmounted.
>>
>> Note also that anything in lost+found will be "relost" and then
>> "refound" as xfs_repair just unlinks that directory as part of the
>> repair process.
>>
>> Once the repair is complete, you can then remount the file system.
>>
>> NOTE - you can run an xfs_check on the partition first to see what it
>> may report as any problems.  However, if xfs_repair should be safe to
>> run in most (all?) cases.
>
>I ran xfs_check /srv but got "xfs_check: can't determine device size". I'm
>doing something wrong?

Once you get it unmounted (check that other processes are not using it,
you may need to switch to init level 2 or even 1...

Anyway, once it is unmounted, you should use:

        xfs_check /dev/md5

and then try

        xfs_repair /dev/md5

If you need to reboot to umount the volume, you may need to mount it
once and then umount it to make sure that the journal (log) is replayed
before doing the xfs_repair.

You can see some scripts I have that do this "automatically" for my
servers using rebooting into LILO to even handle the "/" mount at
http://www.sinz.org/Linux/


-- 
Michael Sinz - http://www.sinz.org/Michael.Sinz/Linux - Linux@xxxxxxxx



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