On August 10, 2015 11:00:38 PM EDT, Jan Engelhardt
On Tuesday 2015-08-11 04:29, Greg Freemyer wrote:
My method would be to make a full copy of the drive to a usb drive via
dd.
dd if=/dev/sda of=image_file.dd bs=4k conv=sync,noerror
Then restore it via dd.
ddrescue is a much better program for this task.
The restore should cause any bad sectors to remap, assuming there are any spare sectors to remap to.
For that, you do not have to copy the entire disk. Grab a bad sector list, and only rewrite those. Something like ddrescue -f /dev/sda /dev/zero logfile.txt ddrescue -f -F - /dev/zero /dev/sda logflie.txt
Maybe If the drive is in such bad shape that ddrescue is needed, then I'd toss the drive, not try to get it back operational. Also, there are "weak" sectors that succeed after multiple read attempts. The ddrescue method does nothing to help them. The full dd method lets the disk controller re-map them if it wants to. As I understand it, a lot of sectors that get re-mapped are of the weak variety, so doing a full dd read and write every year or two might be good preventive maintenance. Greg -- Sent from my Android device with K-9 Mail. Please excuse my brevity. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org