
On 28/02/17 20:59, Stevens wrote:
On 02/28/2017 02:37 PM, Felix Miata wrote:
Greg Freemyer composed on 2017-02-28 15:24 (UTC-0500):
Yes, that will work as long as you run it as root, but if it's that old, you might have a bad sector or two.
At a minimum use this:
dd if=/dev/sdb of=[whatever] bs=512 conv=noerror,sync
bs=512 will slow things down, but make sure that if you have an error, only the truly bad sectors will be lost. A sector is 512 bytes and they are either good or bad.
noerror says not to stop just because you hit a failed sector
sync says that if you have a bad sector, fill that part of your backup with zeros.
Any reason not to use dd_rescue instead of dd in the first place?
My being totally unfamiliar with dd_rescue probably enters into it.
As far as I am aware, basic ddrescue syntax is identical to dd. HOWEVER. If you have problems with dd it will leave you up a gum tree. Especially if copying something like a disk drive. The classic problem with dd aiui, is that if it fails to read, lets say, sector 10 on your old drive, it simply skips that when writing to the new drive, so the old sector 11 becomes the new sector 10. Cue everything after your failed read being scrambled. That's why the default is to abort after a failed read! Just use ddrescue as if it were dd, and (a) your chances of a successful copy are a lot higher - it has loads of tricks for dealing with dodgy reads, and (b) the copy you end up with will be as perfect as possible - holes where there were failed reads etc. It will also give you a log of any failed reads if you ask it, so you can (if your fu is good enough) work out what files have been damaged. Hopefully, on the raid list we will soon have a script that will take that log and force soft read failures on the new drive where there was a hard failure on the old one. That will cause any attempt to read a corrupt file to bomb. Cheers, Wol -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org