[plug] Drive check.

Campbell, David (Ex AS17) david.j.campbell at honeywell.com
Thu Dec 7 08:24:33 WST 2000


Normally this check is done automatically at boot (if only for filesystem
errors). When this check is performed the root filesystem is mounted as
read-only and hence the warning is not applicable. If the filesystem is
mounted as read-write then fscking the disk is equivalent of a shotgun at
point blank range.

Checking for bad blocks is fairly easy, just dd the entire device to
/dev/null (eg: "dd if=/dev/hda of=/dev/null bs=8k", the bs forces the
transfer size from 512 bytes to 8kb which will give some performance
boosts). This will confirm is there are any bad sectors, if it passes then
the whole disk is OK. Normally IDE drives perform sector reallocation on the
fly (at the hardware level) so you shouldn't see any problems.

David Campbell

> -----Original Message-----
> From:	Brian Tombleson [SMTP:brian at ParadigmIT.com.au]
> Sent:	Thursday, December 07, 2000 7:44 AM
> To:	plug at plug.linux.org.au
> Subject:	[plug] Drive check.
> 
> Hi All,
> 
> How do you check the (IDE) root file system (/) for errors and bad blocks
> safely?
> 
> e2fsck / fsck say:
> 
> $ e2fschk -c -f -v /dev/hda1
> 
>     WARNING!!!  Running e2fsck on a mounted filesystem may cause
>     SEVERE filesystem damage.
> 
>     Do you really want to continue (y/n)?
> 
> 
> Not being intimately familiar with the implications of this, I thought I'd
> better ask first as the man pages don't mention such risks.
> 
> It's mounted in single-user mode also and I get the same warning.
> 
> Any hints appreciated.
> 
> 
> - Brian.



More information about the plug mailing list