On Wed, 10 Dec 2003 14:47:30 -0800, Norman Zhang wrote:
>>> 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/
>
>Thanks. I will try umounting again and follow your steps after hours. This
>is a production server 8(
>
>I'm just wondering, won't Linux (Mandrake 9.2) do fsck automatically? After
>each reboot, I do see that it complained system not shutdown properly, press
>Y to force check. I press it. System scans some stuffs then repairs. I still
>see data corruptions 8(
XFS is a journalled file system that, under most all situations, should not
need any fsck. Most all distros/init scripts do run FSCK at boot time but
for XFS this is not needed and is a no-op.
The xfs_repair is for when something drastically wrong happens, usually due
to a bug somewhere or a really unlucky bit of timing with bad hardware (where
writes are not really flushed when they say they are). My only cases where
an xfs_repair have been needed was during the various bugs and fixes to the
XFS code itself and one system where the hard drive just suddenly quit and
did not finish flushing its cache to disk. (That was a really strange
case of firmware gone bad within the drive)
--
Michael Sinz - http://www.sinz.org/Michael.Sinz/Linux - Linux@xxxxxxxx
|