3TB NTFSドライブのパーティションテーブルの問題

3TB NTFSドライブのパーティションテーブルの問題

NTFSでフォーマットされ、USBエンクロージャに挿入された3TB HDDがあります。 WindowsとLinuxで1年間問題なく使用してきました。最近、LinuxとWindowsでマウントが停止しましたが、Windowsで接続するとディスクがフォーマットされていないので、フォーマットする必要があるというウィンドウが表示されます。

いくつかの調査をしましたが、問題は次のとおりです。

GPartedは、ハードドライブ全体が割り当てられていないと主張し、GPTテーブルに関する警告を表示します。

だから、そこのアドバイスに従って「sudo gdisk」と「x」「e」「w」を実行しましたが、gdiskにエラーメッセージは表示されませんが、両方のOSでドライブをマウントできないようです。誰でも助けることができますか?

そして、これを行う前にddrescueを使ってドライブ全体のイメージファイルを別のドライブにバックアップしておいたので、必ずしなければならない場合は、イメージファイルを元のドライブにdd-ingして最初からやり直すこともできました。

/dev/sda問題のドライブであり、/dev/sdb私のOSドライブです。

gdisk私がしたことと結果を以下に記録してください。

username@computername:~$ 
username@computername:~$ sudo gdisk
[sudo] password for username: 
no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory
GPT fdisk (gdisk) version 0.8.8

Type device filename, or press <Enter> to exit: /dev/sda
Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Warning! Secondary partition table overlaps the last partition by
4294964337 blocks!
Try reducing the partition table size by 17179857348 entries.
(Use the 's' item on the experts' menu.)

Command (? for help): p
Disk /dev/sda: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): GUID redacted for internet
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1565565838
Partitions will be aligned on 8-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              34          262177   128.0 MiB   0C01  Microsoft reserved part
   2          264192      5860530175   2.7 TiB     0700  Basic data partition

Command (? for help): 

Command (? for help): ?
b   back up GPT data to a file
c   change a partition's name
d   delete a partition
i   show detailed information on a partition
l   list known partition types
n   add a new partition
o   create a new empty GUID partition table (GPT)
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   sort partitions
t   change a partition's type code
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Command (? for help): r

Recovery/transformation command (? for help): ?
b   use backup GPT header (rebuilding main)
c   load backup partition table from disk (rebuilding main)
d   use main GPT header (rebuilding backup)
e   load main partition table from disk (rebuilding backup)
f   load MBR and build fresh GPT from it
g   convert GPT into MBR and exit
h   make hybrid MBR
i   show detailed information on a partition
l   load partition data from a backup file
m   return to main menu
o   print protective MBR data
p   print the partition table
q   quit without saving changes
t   transform BSD disklabel partition
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Recovery/transformation command (? for help): i
Partition number (1-2): 1
Partition GUID code: E3C9E316-0B5C-4DB8-817D-F92DF00215AE (Microsoft reserved)
Partition unique GUID: 65C662F3-DDA4-4CF3-B223-228B3E203AAF
First sector: 34 (at 17.0 KiB)
Last sector: 262177 (at 128.0 MiB)
Partition size: 262144 sectors (128.0 MiB)
Attribute flags: 0000000000000000
Partition name: 'Microsoft reserved partition'

Recovery/transformation command (? for help): i
Partition number (1-2): 2
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: 591D05F1-E277-4AD9-99E3-3F5834DB601E
First sector: 264192 (at 129.0 MiB)
Last sector: 5860530175 (at 2.7 TiB)
Partition size: 5860265984 sectors (2.7 TiB)
Attribute flags: 0000000000000000
Partition name: 'Basic data partition'

Recovery/transformation command (? for help): 

Recovery/transformation command (? for help): v

Problem: The secondary header's self-pointer indicates that it doesn't reside
at the end of the disk. If you've added a disk to a RAID array, use the 'e'
option on the experts' menu to adjust the secondary header's and partition
table's locations.

Warning! Secondary partition table overlaps the last partition by
4294964337 blocks!
Try reducing the partition table size by 17179857348 entries.
(Use the 's' item on the experts' menu.)

Caution: Partition 1 doesn't begin on a 8-sector boundary. This may
result in degraded performance on some modern (2009 and later) hard disks.

Consult http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disks/
for information on disk alignment.

Identified 2 problems!

Recovery/transformation command (? for help): 


username@computername:~$ sudo gdisk
[sudo] password for username: 
no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory
GPT fdisk (gdisk) version 0.8.8

Type device filename, or press <Enter> to exit: /dev/sda
Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Warning! Secondary partition table overlaps the last partition by
4294964337 blocks!
Try reducing the partition table size by 17179857348 entries.
(Use the 's' item on the experts' menu.)

Command (? for help): p
Disk /dev/sda: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): GUID redacted for internet
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1565565838
Partitions will be aligned on 8-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              34          262177   128.0 MiB   0C01  Microsoft reserved part
   2          264192      5860530175   2.7 TiB     0700  Basic data partition

Command (? for help): v

Problem: The secondary header's self-pointer indicates that it doesn't reside
at the end of the disk. If you've added a disk to a RAID array, use the 'e'
option on the experts' menu to adjust the secondary header's and partition
table's locations.

Warning! Secondary partition table overlaps the last partition by
4294964337 blocks!
Try reducing the partition table size by 17179857348 entries.
(Use the 's' item on the experts' menu.)

Caution: Partition 1 doesn't begin on a 8-sector boundary. This may
result in degraded performance on some modern (2009 and later) hard disks.

Consult http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disks/
for information on disk alignment.

Identified 2 problems!

Command (? for help): x

Expert command (? for help): ?
a   set attributes
c   change partition GUID
d   display the sector alignment value
e   relocate backup data structures to the end of the disk
g   change disk GUID
h   recompute CHS values in protective/hybrid MBR
i   show detailed information on a partition
l   set the sector alignment value
m   return to main menu
n   create a new protective MBR
o   print protective MBR data
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   resize partition table
t   transpose two partition table entries
u   Replicate partition table on new device
v   verify disk
w   write table to disk and exit
z   zap (destroy) GPT data structures and exit
?   print this menu

Expert command (? for help): e
Relocating backup data structures to the end of the disk

Expert command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): Y
OK; writing new GUID partition table (GPT) to /dev/sda.
The operation has completed successfully.
username@computername:~$ 

その後、私は次のことをしました。

sudo gdisk x e- バックアップテーブルをディスクの後ろに移動w

問題は解決されませんでした。それから私はそうでした。

sudo gdisk r d use main GPT header (rebuilding backup) w

問題も解決できませんでした。それから私はそうでした。

sudo gdisk u Replicate partition table on new device w

これも問題が解決しないのでこうしました。

sudo gdisk o create a new empty GUID partition table (GPT) w

その後、再起動してください

sudo gdisk n add a new partitionパーティション1、開始セクタ32、終了セクタ262177、タイプ0c01。パーティション2、開始セクター264192、終了セクター1565565838、タイプ0700。wディスクへの書き込み。

その後、最後の段階でミスをしたことに気づきました。新しいパーティション2は746GiBで終わりました。なぜなら、ドライブが破損した古いGPTの下に表示されているからです。だから戻って、2番目のパーティションを2.7GiBにフォーマットしました。

sudo gdisk o create a new empty GUID partition table (GPT) w

sudo gdisk n add a new partitionパーティション 1 は以前と同じで、パーティション 2 は 264192 で始まり、56860533134 で終わり、0700 と入力します。

ただし、USBエンクロージャのあるWIndows 7ボックスまたはxubuntuボックスに入れると、HDDは物理的に746GiBドライブであり、2.7TiBの新しいパーティションが間違っていると考え、gdiskでパーティションテーブルを変更することを提案します。これはUSBエンクロージャの問題である可能性があるため、これをSATAと一緒にボックスに挿入し、SystemRescueCDを再利用しました。

ベストアンサー1

パーティションテーブルでは、ディスクサイズが実際には2.7TBであり、それだけのスペースを使用するパーティションが1つあるにもかかわらず、ディスクサイズは0.7TBに過ぎないと主張しています。gdisk新しい空のパーティションテーブルを作成し、まったく同じ開始セクタと終了セクタとタイプコードを使用して2つのパーティションを再生成するために使用されます。これにより問題が解決します。

おすすめ記事