[clue-tech] fsck and badblocks
Angelo Bertolli
angelo at freeshell.org
Mon Feb 14 10:58:13 MST 2005
David Anselmi wrote:
> Angelo Bertolli wrote:
>
>> I was reading the man page for badblocks and it says to use it by
>> using the -c option with fsck. Does this mean that fsck doesn't check
>> for bad blocks automatically? How would you do a reboot/fsck with the
>> -c option?
>
>
> No, fsck does not check for bad blocks automatically (checking every
> block takes a long time). You ask it to by:
>
> e2fsck -c [other options] device
>
> where device is the device file for your partition.
>
> Do you need to reboot to run fsck? No. Do you need to run it on an
> unmounted or read-only partition? Possibly, but it probably doesn't
> matter if you aren't fixing anything.
>
If my entire filesystem is mounted on /, can I just do a
mount -o remount,ro /
And then run e2fsck? Will that have any adverse effects on a production
server? I really think it needs to be done. Sometimes when I cat or
grep files, I get "Input/output error" ... and I'm guessing that's a
problem with the file system. Even though this means some things may be
unavailable for a while, I think this is probably better than rebooting
a server I don't have physical access to (tried that before).
Angelo
More information about the clue-tech
mailing list