(潜在的に欠陥がある)ハードドライブの取り付け

(潜在的に欠陥がある)ハードドライブの取り付け

私はずっと前にLacie 2Big Triple RAIDドライブを持っていましたが、ケースが壊れる前に家族の写真を何枚もコピーしませんでした。既存のハードドライブをカードリーダーに挿入しようとしましたが、ディスクをマウントできませんでした。

最初のディスクの場合:

# fdisk -l
Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model:  Disk           
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start       End   Sectors   Size Id Type
/dev/sda1           1 976773167 976773167 465.8G ee GPT

fdisk出力で内部ディスクのみを編集しました。

# file -sk /dev/sda
/dev/sda: DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 1, 1953366015 sectors, extended partition table (last)\012-  DOS/MBR boot sector\012-  GPT partition table, version 1.0, GUID: 8868abf6-211c-4f2d-9f22-44778cbe6b2b, disk size: 1953366016 sectors\012-  of 512 bytes\012- data

ディスク1の場合gdisk:

# gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.8

Warning! Disk size is smaller than the main header indicates! Loading
secondary header from the last sector of the disk! You should use 'v' to
verify disk integrity, and perhaps options on the experts' menu to repair
the disk.
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.

Warning! One or more CRCs don't match. You should repair the disk!
Main header: OK
Backup header: ERROR
Main partition table: OK
Backup partition table: ERROR

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: damaged

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Model:  Disk           
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 8868ABF6-211C-4F2D-9F22-44778CBE6B2B
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 1953365982
Partitions will be aligned on 8-sector boundaries
Total free space is 262157 sectors (128.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System Partition
   2          409640      1953103831   931.1 GiB   AF00  Mike

2番目のセット:

# fisk -l
Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model:  Disk           
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

そしてファイル:

# file -sk /dev/sda
/dev/sda: data

ディスク2の場合gdisk:

# gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.8

Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries in memory.
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Model:  Disk           
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 963D4F54-1270-451A-A1A0-0BEA70978DF7
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 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 976773101 sectors (465.8 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name

私が知っている限り、RAID1(ミラー)が使用されることがわかっています。このディスクのIDが見つかりませんでした。

DiskWarriorを使ってMacにインストールしましたが、Linuxが最善の選択肢になると思いました。しかし、私はアイデアが少し不足しています。上記のようなディスクが表示されたら、そのディスクを再マウントしてファイルにアクセスする方法についてのヒントはありますか?

他のツールを購入またはインストールすることを望んでいますが、アドバイスが必要です。

ベストアンサー1

パーティションサイズはドライブサイズの約2倍なので、raid0である可能性が高く、ブロックサイズを決定する必要があります。デバイスは接続もサポートしていますが...パーティションの配置は奇妙です。 40セクターオフセットです...ああ、古いです。

試行錯誤によってブロックサイズを決定するための不都合な方法です(System Rescueまたは同様のLinuxライブ環境を使用)。より良いアプローチのためには、生データを調べる必要があります(JPEGヘッダーオフセットを見つけて一緒に編みます。オフセットが20Kの場合はパーティションのソートによるものです)。

読み取り専用ループデバイスを作成します。

# losetup --find --show --read-only /dev/sda
/dev/loop0
# losetup --find --show --read-only /dev/sdb
/dev/loop1

読み取り専用mdadm raid0ビルド(メタデータなし):

# mdadm --build /dev/md42 \
        --level=0 --chunk=64K \
        --raid-devices=2 /dev/loop0 /dev/loop1

注:何らかの理由でオプションはmdadm --build許可されていないため、このステップの読み取り専用属性はループデバイスの読み取り専用属性によって異なります。mdadm --readonlyコピーまたは記録中にコピーオーバーレイでこの種の操作を試すことをお勧めします。

何もないことを確認してください。

# file -s /dev/md42*
/dev/md42:   DOS/MBR boot sector …
/dev/md42p1: DOS/MBR boot sector, code offset 0x3c+2, OEM-ID "mkfs.fat" …
/dev/md42p2: SGI XFS filesystem data …

パーティションは常に表示する必要がありますが(そうでない場合はドライブの順序を切り替えてください)、それはマウントできるという意味ではありません。

読み取り専用としてマウントします(一部のファイルシステムはまだroモードで書き込みを試みるため、読み取り専用ループデバイスの他の層を使用します):

# mount -o loop,ro /dev/md42p1 /mnt
# ls /mnt
…any files?
# umount /mnt

# mount -o loop,ro /dev/md42p2 /mnt
# ls /mnt
…any files?
# umount /mnt

マウントされ、ファイルのリストが表示されている場合でも、ファイルの大きな塊を見つけてその内容を確認する必要があります。マウントされたものがまだ破損している可能性があるため、完全な大容量ファイルが必要です。

ステップが失敗した場合は、再起動して別のブロックサイズを試してください。

# mdadm --stop /dev/md42
# mdadm --build … --chunk=128K

すすぎ、64K 128K 32K 256K 16K 512K 4Kを繰り返します。次のいずれかで動作できることを願っています。

--level=linearこれらのいずれかが機能しない場合(ブロックサイズなし)を試してみることもできます。

おすすめ記事