[TAG] USB Drive Bad Sectors

Brandon M. Reynolds breynolds at comtime.com
Sat Oct 28 01:04:01 MSD 2006


Greetings,

I have Linux (2.6.15.6) booting from a USB drive.  My application is
machine control and I wanted to use something solid-state.  A USB stick
seemed like a good idea because it is cheap and readily available and
reasonably fast.

My problem is that I get file system corruption and "bad sectors" some
times, presumably due to an unclean shut down.  I am using an ext2
filesystem with the thinking that a journal would just wear out the
drive in a certain spot.  Maybe that's not correct -- I am not sure if
the drive has a wear-leveling algorithm implemented or not.

Questions:

1. Is ext2 the right choice?  Or would reiserfs be better? Vfat??

2. Is their a quick way to detect bad sectors?  I tried running e2fsck
-c but it has been 45 minutes so far!

I am thinking if I can detect the corruption, I can just reformat the
partition and restore it from another read-only partition.  The kernel
seems to report them:

sd 5:0:0:0: SCSI error: return code = 0x08000002
sdb: Current: sense key=0x3
    ASC=0x11 ASCQ=0x0
end_request: I/O error, dev sdb, sector 598730

I guess I could grep the messages log, but I don't think that is a
conclusive check.

Any pointers would be appreciated.

Brandon Reynolds                Ph: 330-644-3059
Systems Engineer                Fax: 330-644-8110
CTI, a Poling Group Company     Email: bmr at comtime.com
  






More information about the TAG mailing list