我一直在尝试从 Seagate 7200.11 1.5TB 驱动器(2 个 ext4 分区_)恢复数据 3 天,主要使用 ddrescue 和 testdisk,但由于磁盘上出现一些严重错误(可能是 SA 损坏或类似的情况?),它得到当系统访问某些特定扇区时,会删除/dev。
我想,我最接近的是 ddrescue。但它创建的图像不完整,我无法安装它,因为它给出了“错误的几何形状:块计数xxx超过设备的大小..”错误等。昨晚我再次启动了ddrescue,这次是在第二个分区,等待了3个小时后,就去睡觉了。当时,它已从 ~700GB 分区复制了 ~150GB。使用的命令:
ddrescue -n -v -T 30 --skip-size=1M,10M --min-read-rate=50k /dev/sdc2 /media/rescue/Drive2.img /media/rescue/Drive2.log
当我醒来并看到驱动器已从 /dev/ 中消失时,我非常失望,因此 ddrescue 显示 200GB+ 范围内的“错误大小”。 /var/log/messages 包含重复行:
2014-06-13T10:54:08.526490+05:00 suse kernel: [ 6693.096125] Read(10): 28 00 5a 79 55 88 00 00 08 00
2014-06-13T10:54:08.526491+05:00 suse kernel: [ 6693.096174] sd 2:0:0:0: [sdc] Unhandled error code
2014-06-13T10:54:08.526491+05:00 suse kernel: [ 6693.096176] sd 2:0:0:0: [sdc]
2014-06-13T10:54:08.526492+05:00 suse kernel: [ 6693.096176] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
2014-06-13T10:54:08.526493+05:00 suse kernel: [ 6693.096177] sd 2:0:0:0: [sdc] CDB:
2014-06-13T10:54:08.526494+05:00 suse kernel: [ 6693.096178] Read(10): 28 00 5a 79 4d e8 00 00 08 00
2014-06-13T10:54:08.526494+05:00 suse kernel: [ 6693.096226] sd 2:0:0:0: [sdc] Unhandled error code
大约在它从 /dev 消失的时候(我认为):
2014-06-13T07:34:30.290574+05:00 suse kernel: [ 6743.832817] ata3: EH complete
2014-06-13T07:34:33.892459+05:00 suse kernel: [ 6747.432198] ata3.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x0
2014-06-13T07:34:33.892486+05:00 suse kernel: [ 6747.432203] ata3.00: irq_stat 0x40000008
2014-06-13T07:34:33.892489+05:00 suse kernel: [ 6747.432206] ata3.00: failed command: READ FPDMA QUEUED
2014-06-13T07:34:33.892502+05:00 suse kernel: [ 6747.432212] ata3.00: cmd 60/08:00:10:50:08/00:00:5c:00:00/40 tag 0 ncq 4096 in
2014-06-13T07:34:33.892511+05:00 suse kernel: [ 6747.432212] res 41/40:08:17:50:08/00:00:5c:00:00/00 Emask 0x409 (media error) <F>
2014-06-13T07:34:33.892517+05:00 suse kernel: [ 6747.432215] ata3.00: status: { DRDY ERR }
2014-06-13T07:34:33.892519+05:00 suse kernel: [ 6747.432217] ata3.00: error: { UNC }
2014-06-13T07:34:34.003455+05:00 suse kernel: [ 6747.543056] ata3.00: configured for UDMA/133
2014-06-13T07:34:34.003476+05:00 suse kernel: [ 6747.543074] sd 2:0:0:0: [sdc] Unhandled sense code
2014-06-13T07:34:34.003480+05:00 suse kernel: [ 6747.543076] sd 2:0:0:0: [sdc]
2014-06-13T07:34:34.003483+05:00 suse kernel: [ 6747.543078] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
2014-06-13T07:34:34.003486+05:00 suse kernel: [ 6747.543080] sd 2:0:0:0: [sdc]
2014-06-13T07:34:34.003488+05:00 suse kernel: [ 6747.543082] Sense Key : Medium Error [current] [descriptor]
2014-06-13T07:34:34.003491+05:00 suse kernel: [ 6747.543085] Descriptor sense data with sense descriptors (in hex):
2014-06-13T07:34:34.003502+05:00 suse kernel: [ 6747.543086] 72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00
2014-06-13T07:34:34.003503+05:00 suse kernel: [ 6747.543095] 5c 08 50 17
2014-06-13T07:34:34.003504+05:00 suse kernel: [ 6747.543099] sd 2:0:0:0: [sdc]
2014-06-13T07:34:34.003505+05:00 suse kernel: [ 6747.543110] Add. Sense: Unrecovered read error - auto reallocate failed
2014-06-13T07:34:34.003505+05:00 suse kernel: [ 6747.543111] sd 2:0:0:0: [sdc] CDB:
2014-06-13T07:34:34.003506+05:00 suse kernel: [ 6747.543112] Read(10): 28 00 5c 08 50 10 00 00 08 00
2014-06-13T07:34:34.003507+05:00 suse kernel: [ 6747.543116] end_request: I/O error, dev sdc, sector 1544048663
2014-06-13T07:34:34.003508+05:00 suse kernel: [ 6747.543118] Buffer I/O error on device sdc2, logical block 3270402
2014-06-13T07:34:34.003509+05:00 suse kernel: [ 6747.543127] ata3: EH complete
2014-06-13T07:34:36.758454+05:00 suse kernel: [ 6750.295735] ata3.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x0
2014-06-13T07:34:36.758484+05:00 suse kernel: [ 6750.295740] ata3.00: irq_stat 0x40000008
2014-06-13T07:34:36.758488+05:00 suse kernel: [ 6750.295743] ata3.00: failed command: READ FPDMA QUEUED
2014-06-13T07:34:36.758492+05:00 suse kernel: [ 6750.295750] ata3.00: cmd 60/08:00:10:50:08/00:00:5c:00:00/40 tag 0 ncq 4096 in
2014-06-13T07:34:36.758496+05:00 suse kernel: [ 6750.295750] res 41/40:08:17:50:08/00:00:5c:00:00/00 Emask 0x409 (media error) <F>
2014-06-13T07:34:36.758499+05:00 suse kernel: [ 6750.295752] ata3.00: status: { DRDY ERR }
2014-06-13T07:34:36.758502+05:00 suse kernel: [ 6750.295754] ata3.00: error: { UNC }
2014-06-13T07:34:36.932467+05:00 suse kernel: [ 6750.469333] ata3.00: configured for UDMA/133
2014-06-13T07:34:36.932495+05:00 suse kernel: [ 6750.469351] sd 2:0:0:0: [sdc] Unhandled sense code
2014-06-13T07:34:36.932501+05:00 suse kernel: [ 6750.469354] sd 2:0:0:0: [sdc]
2014-06-13T07:34:36.932504+05:00 suse kernel: [ 6750.469355] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
2014-06-13T07:34:36.932507+05:00 suse kernel: [ 6750.469357] sd 2:0:0:0: [sdc]
2014-06-13T07:34:36.932510+05:00 suse kernel: [ 6750.469359] Sense Key : Medium Error [current] [descriptor]
2014-06-13T07:34:36.932514+05:00 suse kernel: [ 6750.469362] Descriptor sense data with sense descriptors (in hex):
2014-06-13T07:34:36.932534+05:00 suse kernel: [ 6750.469364] 72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00
2014-06-13T07:34:36.932546+05:00 suse kernel: [ 6750.469372] 5c 08 50 17
2014-06-13T07:34:36.932551+05:00 suse kernel: [ 6750.469376] sd 2:0:0:0: [sdc]
2014-06-13T07:34:36.932556+05:00 suse kernel: [ 6750.469379] Add. Sense: Unrecovered read error - auto reallocate failed
2014-06-13T07:34:36.932560+05:00 suse kernel: [ 6750.469381] sd 2:0:0:0: [sdc] CDB:
2014-06-13T07:34:36.932564+05:00 suse kernel: [ 6750.469382] Read(10): 28 00 5c 08 50 10 00 00 08 00
2014-06-13T07:34:36.932567+05:00 suse kernel: [ 6750.469390] end_request: I/O error, dev sdc, sector 1544048663
2014-06-13T07:34:36.932572+05:00 suse kernel: [ 6750.469394] Buffer I/O error on device sdc2, logical block 3270402
2014-06-13T07:34:36.932576+05:00 suse kernel: [ 6750.469420] ata3: EH complete
2014-06-13T07:36:15.441806+05:00 suse su: (to root) procyon on /dev/pts/5
2014-06-13T07:53:20.731456+05:00 suse kernel: [ 7873.286421] ata3: failed to read log page 10h (errno=-5)
2014-06-13T07:53:20.731483+05:00 suse kernel: [ 7873.286429] ata3.00: exception Emask 0x1 SAct 0x1 SErr 0x0 action 0x0
2014-06-13T07:53:20.731487+05:00 suse kernel: [ 7873.286431] ata3.00: irq_stat 0x40000008
2014-06-13T07:53:20.731488+05:00 suse kernel: [ 7873.286434] ata3.00: failed command: READ FPDMA QUEUED
2014-06-13T07:53:20.731490+05:00 suse kernel: [ 7873.286440] ata3.00: cmd 60/08:00:10:59:6d/00:00:60:00:00/40 tag 0 ncq 4096 in
2014-06-13T07:53:20.731493+05:00 suse kernel: [ 7873.286440] res 40/00:00:10:59:6d/00:00:60:00:00/40 Emask 0x1 (device error)
2014-06-13T07:53:20.731495+05:00 suse kernel: [ 7873.286443] ata3.00: status: { DRDY }
2014-06-13T07:53:20.740442+05:00 suse kernel: [ 7873.296009] ata3.00: both IDENTIFYs aborted, assuming NODEV
2014-06-13T07:53:20.740462+05:00 suse kernel: [ 7873.296013] ata3.00: revalidation failed (errno=-2)
2014-06-13T07:53:20.740464+05:00 suse kernel: [ 7873.296018] ata3: hard resetting link
2014-06-13T07:53:21.045453+05:00 suse kernel: [ 7873.599792] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
2014-06-13T07:53:21.065444+05:00 suse kernel: [ 7873.620355] ata3.00: both IDENTIFYs aborted, assuming NODEV
2014-06-13T07:53:21.065467+05:00 suse kernel: [ 7873.620359] ata3.00: revalidation failed (errno=-2)
2014-06-13T07:53:26.045451+05:00 suse kernel: [ 7878.595494] ata3: hard resetting link
2014-06-13T07:53:26.350457+05:00 suse kernel: [ 7878.900156] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
2014-06-13T07:53:26.395504+05:00 suse kernel: [ 7878.945713] ata3.00: both IDENTIFYs aborted, assuming NODEV
2014-06-13T07:53:26.395516+05:00 suse kernel: [ 7878.945717] ata3.00: revalidation failed (errno=-2)
2014-06-13T07:53:26.395518+05:00 suse kernel: [ 7878.945719] ata3.00: disabled
2014-06-13T07:53:26.395520+05:00 suse kernel: [ 7878.945752] ata3: EH complete
2014-06-13T07:53:26.395522+05:00 suse kernel: [ 7878.945774] sd 2:0:0:0: [sdc] Unhandled error code
2014-06-13T07:53:26.395523+05:00 suse kernel: [ 7878.945775] sd 2:0:0:0: [sdc]
2014-06-13T07:53:26.395525+05:00 suse kernel: [ 7878.945776] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
2014-06-13T07:53:26.395528+05:00 suse kernel: [ 7878.945777] sd 2:0:0:0: [sdc] CDB:
2014-06-13T07:53:26.395529+05:00 suse kernel: [ 7878.945778] Read(10): 28 00 60 6d 59 10 00 00 08 00
2014-06-13T07:53:26.395531+05:00 suse kernel: [ 7878.945782] end_request: I/O error, dev sdc, sector 1617778960
2014-06-13T07:53:26.395532+05:00 suse kernel: [ 7878.945784] Buffer I/O error on device sdc2, logical block 12486690
2014-06-13T07:53:26.395534+05:00 suse kernel: [ 7878.945863] sd 2:0:0:0: [sdc] Unhandled error code
2014-06-13T07:53:26.395535+05:00 suse kernel: [ 7878.945868] sd 2:0:0:0: [sdc]
2014-06-13T07:53:26.395537+05:00 suse kernel: [ 7878.945869] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
2014-06-13T07:53:26.395538+05:00 suse kernel: [ 7878.945872] sd 2:0:0:0: [sdc] CDB:
2014-06-13T07:53:26.395540+05:00 suse kernel: [ 7878.945873] Read(10): 28 00 60 6d 59 10 00 00 08 00
2014-06-13T07:53:26.395541+05:00 suse kernel: [ 7878.945882] end_request: I/O error, dev sdc, sector 1617778960
2014-06-13T07:53:26.395543+05:00 suse kernel: [ 7878.945885] Buffer I/O error on device sdc2, logical block 12486690
2014-06-13T07:53:26.395544+05:00 suse kernel: [ 7878.945997] sd 2:0:0:0: [sdc] Unhandled error code
2014-06-13T07:53:26.395546+05:00 suse kernel: [ 7878.946000] sd 2:0:0:0: [sdc]
2014-06-13T07:53:26.395547+05:00 suse kernel: [ 7878.946002] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
2014-06-13T07:53:26.395548+05:00 suse kernel: [ 7878.946004] sd 2:0:0:0: [sdc] CDB:
2014-06-13T07:53:26.395550+05:00 suse kernel: [ 7878.946005] Read(10): 28 00 60 6d 59 80 00 00 08 00
2014-06-13T07:53:26.395551+05:00 suse kernel: [ 7878.946012] end_request: I/O error, dev sdc, sector 1617779072
2014-06-13T07:53:26.395552+05:00 suse kernel: [ 7878.946015] Buffer I/O error on device sdc2, logical block 12486704
2014-06-13T07:53:26.395554+05:00 suse kernel: [ 7878.946076] sd 2:0:0:0: [sdc] Unhandled error code
2014-06-13T07:53:26.395555+05:00 suse kernel: [ 7878.946080] sd 2:0:0:0: [sdc]
2014-06-13T07:53:26.395557+05:00 suse kernel: [ 7878.946082] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
2014-06-13T07:53:26.395558+05:00 suse kernel: [ 7878.946085] sd 2:0:0:0: [sdc] CDB:
2014-06-13T07:53:26.395560+05:00 suse kernel: [ 7878.946100] Read(10): 28 00 60 6d 5a 00 00 00 08 00
2014-06-13T07:53:26.395562+05:00 suse kernel: [ 7878.946141] end_request: I/O error, dev sdc, sector 1617779200
2014-06-13T07:53:26.395563+05:00 suse kernel: [ 7878.946152] Buffer I/O error on device sdc2, logical block 12486720
2014-06-13T07:53:26.395580+05:00 suse kernel: [ 7878.946192] sd 2:0:0:0: [sdc] Unhandled error code
2014-06-13T07:53:26.395582+05:00 suse kernel: [ 7878.946194] sd 2:0:0:0: [sdc]
2014-06-13T07:53:26.395584+05:00 suse kernel: [ 7878.946195] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
2014-06-13T07:53:26.395585+05:00 suse kernel: [ 7878.946196] sd 2:0:0:0: [sdc] CDB:
2014-06-13T07:53:26.395587+05:00 suse kernel: [ 7878.946197] Read(10): 28 00 60 6d 5b 00 00 00 08 00
2014-06-13T07:53:26.395588+05:00 suse kernel: [ 7878.946202] end_request: I/O error, dev sdc, sector 1617779456
2014-06-13T07:53:26.395590+05:00 suse kernel: [ 7878.946203] Buffer I/O error on device sdc2, logical block 12486752
2014-06-13T07:53:26.395592+05:00 suse kernel: [ 7878.946221] sd 2:0:0:0: [sdc] Unhandled error code
2014-06-13T07:53:26.395593+05:00 suse kernel: [ 7878.946223] sd 2:0:0:0: [sdc]
2014-06-13T07:53:26.395595+05:00 suse kernel: [ 7878.946224] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
2014-06-13T07:53:26.395596+05:00 suse kernel: [ 7878.946224] sd 2:0:0:0: [sdc] CDB:
2014-06-13T07:53:26.395598+05:00 suse kernel: [ 7878.946227] Read(10): 28 00 60 6d 5d 00 00 00 08 00
2014-06-13T07:53:26.395599+05:00 suse kernel: [ 7878.946228] end_request: I/O error, dev sdc, sector 1617779968
2014-06-13T07:53:26.395601+05:00 suse kernel: [ 7878.946229] Buffer I/O error on device sdc2, logical block 12486816
2014-06-13T07:53:26.395602+05:00 suse kernel: [ 7878.946245] sd 2:0:0:0: [sdc] Unhandled error code
2014-06-13T07:53:26.395608+05:00 suse kernel: [ 7878.946254] sd 2:0:0:0: [sdc]
2014-06-13T07:53:26.395611+05:00 suse kernel: [ 7878.946254] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
2014-06-13T07:53:26.395612+05:00 suse kernel: [ 7878.946255] sd 2:0:0:0: [sdc] CDB:
2014-06-13T07:53:26.395615+05:00 suse kernel: [ 7878.946258] Read(10): 28 00 60 6d 61 00 00 00 08 00
2014-06-13T07:53:26.395616+05:00 suse kernel: [ 7878.946259] end_request: I/O error, dev sdc, sector 1617780992
2014-06-13T07:53:26.395618+05:00 suse kernel: [ 7878.946260] Buffer I/O error on device sdc2, logical block 12486944
2014-06-13T07:53:26.395624+05:00 suse kernel: [ 7878.946281] sd 2:0:0:0: [sdc] Unhandled error code
2014-06-13T07:53:26.395626+05:00 suse kernel: [ 7878.946282] sd 2:0:0:0: [sdc]
2014-06-13T07:53:26.395628+05:00 suse kernel: [ 7878.946284] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
2014-06-13T07:53:26.395629+05:00 suse kernel: [ 7878.946285] sd 2:0:0:0: [sdc] CDB:
2014-06-13T07:53:26.395634+05:00 suse kernel: [ 7878.946286] Read(10): 28 00 60 6d 69 00 00 00 08 00
2014-06-13T07:53:26.395636+05:00 suse kernel: [ 7878.946295] end_request: I/O error, dev sdc, sector 1617783040
2014-06-13T07:53:26.395637+05:00 suse kernel: [ 7878.946297] Buffer I/O error on device sdc2, logical block 12487200
2014-06-13T07:53:26.396515+05:00 suse kernel: [ 7878.946314] sd 2:0:0:0: [sdc] Unhandled error code
2014-06-13T07:53:26.396522+05:00 suse kernel: [ 7878.946315] sd 2:0:0:0: [sdc]
2014-06-13T07:53:26.396524+05:00 suse kernel: [ 7878.946316] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
2014-06-13T07:53:26.396527+05:00 suse kernel: [ 7878.946318] sd 2:0:0:0: [sdc] CDB:
2014-06-13T07:53:26.396529+05:00 suse kernel: [ 7878.946319] Read(10): 28 00 60 6d 79 00 00 00 08 00
2014-06-13T07:53:26.396531+05:00 suse kernel: [ 7878.946323] end_request: I/O error, dev sdc, sector 1617787136
2014-06-13T07:53:26.396533+05:00 suse kernel: [ 7878.946325] Buffer I/O error on device sdc2, logical block 12487712
2014-06-13T07:53:26.396534+05:00 suse kernel: [ 7878.946344] sd 2:0:0:0: [sdc] Unhandled error code
2014-06-13T07:53:26.396536+05:00 suse kernel: [ 7878.946346] sd 2:0:0:0: [sdc]
2014-06-13T07:53:26.396538+05:00 suse kernel: [ 7878.946347] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
2014-06-13T07:53:26.396540+05:00 suse kernel: [ 7878.946348] sd 2:0:0:0: [sdc] CDB:
2014-06-13T07:53:26.396542+05:00 suse kernel: [ 7878.946349] Read(10): 28 00 60 6d 99 00 00 00 08 00
2014-06-13T07:53:26.396544+05:00 suse kernel: [ 7878.946354] end_request: I/O error, dev sdc, sector 1617795328
2014-06-13T07:53:26.396546+05:00 suse kernel: [ 7878.946356] Buffer I/O error on device sdc2, logical block 12488736
2014-06-13T07:53:26.396548+05:00 suse kernel: [ 7878.946374] sd 2:0:0:0: [sdc] Unhandled error code
2014-06-13T07:53:26.396550+05:00 suse kernel: [ 7878.946376] sd 2:0:0:0: [sdc]
2014-06-13T07:53:26.396552+05:00 suse kernel: [ 7878.946377] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
2014-06-13T07:53:26.396554+05:00 suse kernel: [ 7878.946379] sd 2:0:0:0: [sdc] CDB:
2014-06-13T07:53:26.396556+05:00 suse kernel: [ 7878.946379] Read(10): 28 00 60 6d d9 08 00 00 08 00
2014-06-13T07:53:26.396557+05:00 suse kernel: [ 7878.946401] sd 2:0:0:0: [sdc] Unhandled error code
2014-06-13T07:53:26.396560+05:00 suse kernel: [ 7878.946403] sd 2:0:0:0: [sdc]
2014-06-13T07:53:26.396561+05:00 suse kernel: [ 7878.946404] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
不幸的是,我无法弄清楚问题发生在哪个块/扇区,因此我可以从那时起重新启动 ddrescue,跳过麻烦的区域。现在,当我尝试列出要恢复的文件时,testdisk 的情况也是如此;在我煞费苦心地选择了所有要复制的文件后,testdisk 未能复制其中的一个,因为我认为驱动器在扫描过程中消失了。
现在,我已经用以下命令重新启动了 ddrescue:
ddrescue -n -v -T 30 -A --retrim -d -i 150G --skip-size=500k,10M --min-read-rate=50k /dev/sdc2 /media/rescue/Drive2.img /media/rescue/Drive2.log
但由于它肯定会再次重复消失的驱动器现象并产生不完整/几乎无用的图像,我真的需要一些帮助来找出一种方法来跳过导致此问题的扇区,或者任何其他恢复数据的技巧。