> :I thought the linux badblocks program found bad blocks and keep the
> :user from using them. I want to read the entire disk and the parts
> :that don't read I want to try again later to see if I can maybe get
> :lucky.
The linux program creates a data file which the fsckext program uses to
allocate all the bad spots into a single file. For scsi disks you don't
have the option of bad block replacement under linux.
> It's simple, though. Just write a program to open up the raw device
> and read() large (32K) chunks, writing the output to a file.
If you are too lazy to write a program you can use good old 'dd' with the
extra options:
bs=1024 conv=noerror,sync
> When you are through you will have an output image sitting in a file
> that you can then fsck and dd onto a new disk.
Unless the bad spot happens to be an indirect or double indirect block. Then
you are in for a long night of fsdb'in. One of the things I'd like to see in
a file system enhancement would be the implementation of "shadow" indirect
blocks much like the extra superblocks that we can use if the primary one
gets stomped.
Later
Mark Hittinger
Earthlink
[EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message