Using dd to dupliate an entire drive with bs=128K gives read error at 137GB
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Bug Description
I use the following command as part of a script to back up my laptop to tape:
dd if=/dev/sda bs=128k
(For testing purposes, it doesn't matter where the output goes. The error is reproducible even if of=/dev/null.)
I recently put in a new drive, a Hitachi TravelStar (kernel sees: Hitachi HTS722020K9SA00), and installed Gutsy on it. Now when I run my backup, it stops with an IO error at 137GB.
smartctrl said that the drive was healthy, but that there had been errors, so I replaced the drive with another identical drive by using a similar command to the above, but with a block size of 512. That operation completed successfully, but was rather slow even over USB2.
After swapping drives and rebooting, I ran the backup script again, and got the same result.
dmesg output after the error (sorry if this is mangled, it had to be copied through email):
[ 9839.496000] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[ 9839.496000] ata1.00: (BMDMA stat 0x25)
[ 9839.496000] ata1.00: cmd c8/00:f8:
cdb 0x0 data 126976 in
[ 9839.496000] res 51/10:f8:
0x81 (invalid argument)
[ 9839.520000] ata1.00: configured for UDMA/133
[ 9839.520000] sd 0:0:0:0: [sda] Result: hostbyte=DID_OK
driverbyte=
[ 9839.520000] sd 0:0:0:0: [sda] Sense Key : Aborted Command [current]
[descriptor]
[ 9839.520000] Descriptor sense data with sense descriptors (in hex):
[ 9839.520000] 72 0b 14 00 00 00 00 0c 00 0a 80 00 00 00 00 00
[ 9839.520000] 0f ff ff 08
[ 9839.520000] sd 0:0:0:0: [sda] Add. Sense: Recorded entity not found
[ 9839.520000] end_request: I/O error, dev sda, sector 268435208
[ 9839.520000] Buffer I/O error on device sda, logical block 33554401
[ 9839.520000] Buffer I/O error on device sda, logical block 33554402
[ 9839.520000] Buffer I/O error on device sda, logical block 33554403
[ 9839.520000] Buffer I/O error on device sda, logical block 33554404
[ 9839.520000] Buffer I/O error on device sda, logical block 33554405
[ 9839.520000] Buffer I/O error on device sda, logical block 33554406
[ 9839.520000] Buffer I/O error on device sda, logical block 33554407
[ 9839.520000] Buffer I/O error on device sda, logical block 33554408
[ 9839.520000] Buffer I/O error on device sda, logical block 33554409
[ 9839.520000] Buffer I/O error on device sda, logical block 33554410
[ 9839.520000] ata1: EH complete
[ 9839.532000] sd 0:0:0:0: [sda] 390721968 512-byte hardware sectors (200050 MB)
[ 9839.544000] sd 0:0:0:0: [sda] Write Protect is off
[ 9839.544000] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 9839.568000] sd 0:0:0:0: [sda] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
......
Additional info:
- The machine is a Dell Precision M90.
- NVidia driver is loaded. If anyone believes this could be an issue I will unload it and try again.
- After the error, the machine becomes somewhat sluggish.
- Another part of my backup script fills the remaining space on the drive with zeros. That part never has problems:
dd if=/dev/zero of=/tmp/bigfile
- During one test, dmesg gave a different sector number. I neglected to make a note of it, but it was roughly a hundred sectors past where the error usually happens.
- I updated the machine's BIOS to A07 (latest I could locate), and it had no effect.
- I run BOINC but it was paused during this activity.
Interesting.. I wouldn't have expected an issue until block 33554432 (32 bits of 1k chunks taken 128 at a time). Just to confirm, the two blocksizes tried are 128 kilobytes and 512 bytes, rather than 512 kilobytes, correct?