In message <[EMAIL PROTECTED]> Matthew Jacob
writes:
: No, badblocks always reads the whole disk- it emits a list of badblocks.
: It's e2fsck that is then used to tell the filesystem that these blocks are
: unavailable.
Ah. Yes. I see now. It would be useful. Before I discovered this I
hacked togheter something that seemed to work. It basically read all
the blocks that it could and save them to a file and note in an easy
to parse format the bad blocks. I only had 3 after the first go round
(the 512 byte reads did the bulk of the trick, 8k reads died a
horrible death, fsck couldn't cope). I don't know why 512 byte reads
did it, and I noticed my simple progress meter ran faster or slower
depending on which part of the disk it was on. Also, PIO mode seemed
to be better at reading the blocks.
I turned the drive off and let it set for a few hours and was able to
recover the last 3 blocks at that time by hand.
Interestingly enough, once I was able to read an entire partition with
512 byte reads, mount, fsck and some light disk activity seemed to
work with the 8k and 16k read/writes that implied. This is a stupid
20G toshiba laptop disk that I wouldn't have thought did bad block
remapping.
So I'm now running dump on the resulting file :-)
The only thing I couldn't figure out how to do was to mount the file.
Since I grabbed the disk partition, I wasn't sure I could just use
vnconfig since there was no FreeBSD label on that partition.
Warner
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message