Data-Recovery

ddrescue:未對齊的讀取錯誤。扇區大小是否正確?

  • September 9, 2019

我正在嘗試使用 GNUddrescue從故障 SSD 中恢復原始數據。系統是 Debian Stretch。


到目前為止,我得到了以下資訊:

dmesg

[Sun Sep  8 15:04:20 2019] sd 7:0:0:0: [sdd] 468862128 512-byte logical blocks: (240 GB/224 GiB)
[Sun Sep  8 15:04:20 2019] sd 7:0:0:0: [sdd] Write Protect is off
[Sun Sep  8 15:04:20 2019] sd 7:0:0:0: [sdd] Mode Sense: 00 3a 00 00
[Sun Sep  8 15:04:20 2019] sd 7:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[Sun Sep  8 15:04:51 2019] sd 7:0:0:0: [sdd] Attached SCSI disk
[Sun Sep  8 15:06:43 2019] sd 7:0:0:0: [sdd] tag#19 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[Sun Sep  8 15:06:43 2019] sd 7:0:0:0: [sdd] tag#19 CDB: ATA command pass through(16) 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00
[Sun Sep  8 15:06:44 2019] sd 7:0:0:0: [sdd] tag#21 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[Sun Sep  8 15:06:44 2019] sd 7:0:0:0: [sdd] tag#21 CDB: ATA command pass through(16) 85 06 2c 00 da 00 00 00 00 00 4f 00 c2 00 b0 00
[Sun Sep  8 15:09:49 2019] sd 7:0:0:0: [sdd] tag#2 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[Sun Sep  8 15:09:49 2019] sd 7:0:0:0: [sdd] tag#2 CDB: Read(10) 28 00 00 00 00 00 00 00 20 00
[Sun Sep  8 15:09:49 2019] print_req_error: I/O error, dev sdd, sector 0
...

容量

所以,我們有容量 240057409536 個扇區

正如最初確認的那樣fdisk(不再可以使用它):

468862128 512 字節邏輯塊:(240 GB / 224 GiB)


我試過的:

  • fdisk

我第一次執行這個工具時,它輸出了一些有價值的資訊,如上所示。第二次呼叫:

# fdisk /dev/sdd

Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

fdisk: cannot open /dev/sdd: No such file or directory

幾乎與我進入的錯誤相同sfdisk,或者testdisk現在。

  • ls
brw-rw---- 1 root disk 8, 48 Sep  8 16:40 /dev/sdd

所以,設備還在。

  • 數學

468862128群 *512扇區大小 =240057409536最初檢測到的扇區dmesg

  • gdisk
GPT fdisk (gdisk) version 1.0.3

Problem reading disk in BasicMBRData::ReadMBRData()!
Warning! Read error 22; strange behavior now likely!
Warning! Read error 22; strange behavior now likely!
Partition table scan:
 MBR: MBR only
 BSD: not present
 APM: not present
 GPT: not present

***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************

Command (? for help): p

Disk /dev/sdd: 0 sectors, 0 bytes
Model: SATAFIRM   S11  
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): B93E2FDE-39F0-4015-AEC9-96A76520F547
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 18446744073709551582
Partitions will be aligned on 2048-sector boundaries
Total free space is 0 sectors (0 bytes)

Command (? for help): x

Expert command (? for help): o

Disk size is 0 sectors (0 bytes)
MBR disk identifier: 0x00000000
MBR partitions:

Number  Boot  Start Sector   End Sector   Status      Code
  1                     1   4294967295   primary     0xEE
  • GNUddrescue

我的測試執行:

ddrescue -d -f -r3 -R --sector-size=512 --size=240057409536  /dev/sdd /dev/null

給出:

GNU ddrescue 1.23
Press Ctrl-C to interrupt
    ipos:  240057 MB, non-trimmed:        0 B,  current rate:       0 B/s
    opos:  240057 MB, non-scraped:        0 B,  average rate:       0 B/s
non-tried:  240057 MB,  bad-sector:        0 B,    error rate:       0 B/s
 rescued:        0 B,   bad areas:        0,        run time:          0s
pct rescued:    0.00%, read errors:        0,  remaining time:         n/a
                             time since last successful read:         n/a
Copying non-tried blocks... Pass 1 (backwards)
Unaligned read error. Is sector size correct?

在這裡,我只是不知道下一步該做什麼。


我歡迎任何和所有的建議。


PS:有/曾經是 Windows 10 分區。(使用者不知道是否從非 EFI 升級。)


gdisk#2在啟動後立即顯示正確的大小

Disk /dev/sdd: 468862128 sectors, 223.6 GiB
Model: SATAFIRM   S11  
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 476B6FD3-31DC-448B-834A-1E7F4ED18673
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 468862094
Partitions will be aligned on 2048-sector boundaries
Total free space is 468862061 sectors (223.6 GiB)

我不知道這種狀態是如何或為什麼在一分鐘或幾分鐘後消失的。

我沒有註意到驅動器名稱的重要性:

SATAFIRM S11


經過一番搜尋,結果發現可能有一種方法可以恢復 SSD 驅動器,但可能不是數據。

該程序旨在恢復 Phison 3111 (S11) 控制器上磁碟的健康狀況,例如 Smartbuy Revival2、金士頓 A400,由於某些問題,該控制器進入了保護模式。

如果恢復成功,數據將被****銷毀


資料來源:湯姆的硬體

引用自:https://unix.stackexchange.com/questions/539651