Warner Losh wrote:
> OK.  I have a disk drive that is failing in random ways.  Today blocks
> 123 456 and 293 might be unreadable.  Tomorrow, it might be these and
> 27 or it might just be 27.  It is an IDE drive.  I was wondering if anybody
> had a program that would read the entire disk and keep a list/bitmap of
> the bad blocks and try them again next time the program is run.  Operating
> on a slice or partition level would be ideal (I have a 20G disk that
> is failing, but only about 18G of free space).
> 
> Ideas?
> 
> Warner
> 
> P.S.  Basically what I want at the end of the day, disk willing, is
> what dd if=/dev/ad8s2a of=/huge/big-honkin-file ... would give me.
> I want this so I can then dump it to tape.  I can't run dump directly
> since it hits those bad blocks and whines.

I have 2 C programs you might like to extend/ plunder `for parts' :-)
        http://bim.bsn.com/~jhs/src/bsd/jhs/bin/public/valid/valid.c
                & valid.1 Makefile
        http://bim.bsn.com/~jhs/src/bsd/jhs/bin/public/slice/slice.c
                & slice.1 Makefile
valid:
  rescues (or writes) arbitrary (or all) sectors of a floppy,
  but can also be given the name of other devices eg hard disc & normal files.
  It works best on dos ! as dos returns the buffer even if there's a crc error,
  If someone hacked the bsd kernel to return the read() buffer even on error,
  it'd make it equally usefull to rescue sectors on bsd too.
slice:
  rescue data off bad tapes with intermittent drivers, first written to run on 
  BSD4.2 nsc32016, also runs on freebsd of course.

More info in the manuals on the web.

Julian
-
Julian Stacey     Unix Consultant - Munich Germany     http://bim.bsn.com/~jhs/
        Considering Linux ?     Try FreeBSD with its 4200 packages !
 Ihr Rauchen => mein allergischer Kopfschmerz !  Kau/Schnupftabak probieren !


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to