How to replace a hard drive...

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Mon May 9 16:11:59 UTC 2011


On Sun, May 08, 2011 at 07:47:03AM -0400, Giles Orr wrote:
> I have a couple of USB flash drives that give me I/O errors whenever I
> copy stuff to a specific spot on the drive.  ie. when I get to the 6Gb
> mark on one, whatever the file is I'm writing to the drive, it fails.
> If I run "fsck.vfat" against the drive, it always finds an error and
> fixes it ... and then I have exactly the same problem again.  Now I
> read Lennart's view on fsck in the thread about bad hard drives:
> 
> On 5 May 2011 12:45, Lennart Sorensen <lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org> wrote:
> > fsck means nothing.  Use mkfs with badblock check.  Unless you low level
> > formatted it, nothing is done about bad sectors.  Of course modern drives
> > don't need that since they can automatically map bad sectors _on_write_
> > (not on read).  Writing to the whole disk should help the drive remap
> > all bad sectors.
> 
> The man page says "dosfsck - check and repair MS-DOS file systems".
> So it moves stuff around but doesn't tag bad sectors?  That doesn't
> seem like much of a fix.  Does this solution also apply to flash
> drives?  (That is, I should reformat them with a badblock check?)
> These drives don't seem to be remapping on write ...

Some USB keys are cheap crap that don't do wear leveling properly and
don't necesarily remap bad blocks on write either.  In that case you
have to tell the filesystem to skip the bad sectors.  Nothing else to do
(well get a non crap usb key might work.)

-- 
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list