Re: dd failed



I demand that Alan Secker may or may not have written...

I wanted to clone a drive as I have done many times before. I booted from a
knoppix cd and ran dd if=/dev/hde of=/dev/hdg as root. Both drives had been
proven to be sound and bootable before this exercise. The process stopped
with the message 'input/output error'. My question is: 'What tests can I
make to identify what might have gone wrong?'

Check dmesg output or /var/log/syslog - if you see "attempt to access beyond
end of device", then the problem is that hdg is smaller than hde; otherwise,
you should see a real I/O error logged there (and, with any luck, it'll show
up via SMART).

If you've shut it down or rebooted it since, then you can still do some
checking:
$ cat /sys/block/hd[eg]/size
and you can check SMART info and run tests...
# smartctl -a /dev/hde # info for hde
# smartctl -t short /dev/hde # start a short test
# smartctl -t long /dev/hde # start a long test

--
| Darren Salt | linux or ds at | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
| + Output less CO2 => avoid boiling weather. TIME IS RUNNING OUT *FAST*.

dawn chorus: n. Nature's way of telling the programmer to go to sleep.
.