GPT 디스크 파티션 복구 개의 파티션은 각각 약

내 드라이브 중 하나에 파티션을 올바르게 표시하는 데 문제가 있습니다.

설정:

  • 리눅스 3.10.10-1-ARCH
  • 디스크는 2TB이며 파티션이 두 개인 GPT가 있습니다.
  • 두 개의 파티션은 각각 약 700GB를 보유하므로 모든 것을 수용 할 수있는 충분한 공간이 있습니다.
  • 디스크의 데이터에는 전체 백업이 있지만 가능한 경우 ID를 수정하는 것이 좋습니다.
  • livecd에 파티션을 나누고 이전 디스크에서 데이터를 dd’d로 만들었습니다.
  • 두 파티션 모두 ext4이지만 별 문제가되지 않습니다.

내가 실행하는 문제 :

sudo gdisk /dev/sdb

그리고 나는 얻는다 :

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!

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

그런 다음 v정확한 문제를 밝히려고했습니다.

Caution: The CRC for the backup partition table is invalid. This table may
be corrupt. This program will automatically create a new backup partition
table when you save your partitions.

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.

Problem: Disk is too small to hold all the data!
(Disk size is 1953569134 sectors, needs to be 3907029168 sectors.)
The 'e' option on the experts' menu may fix this problem.

Problem: GPT claims the disk is larger than it is! (Claimed last usable
sector is 3907029134, but backup header is at
3907029167 and disk size is 1953569134 sectors.
The 'e' option on the experts' menu will probably fix this problem

Problem: partition 2 is too big for the disk.

Identified 5 problems!

실행 ev다시 얻을 :

Caution: The CRC for the backup partition table is invalid. This table may
be corrupt. This program will automatically create a new backup partition
table when you save your partitions.

Problem: partition 2 is too big for the disk.

Warning! Secondary partition table overlaps the last partition by
1953459891 blocks!
You will need to delete this partition or resize it in another utility.

Identified 3 problems!

이제 p다음을 사용하여 올바른 파티션을 볼 수 있습니다 .

Disk /dev/sdb: 1953569134 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): D690A9B2-EA00-4D2E-9E18-0D4545A8683A
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953569100
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048      1953515519   931.5 GiB   0700
   2      1953515520      3907028991   931.5 GiB   0700

나는이 시점에 붙어 있으며 도움을 주시면 감사하겠습니다.



답변

첫째, 당신은 주장 :

  • 디스크는 2TB이며 파티션이 두 개인 GPT가 있습니다.

불행히도, gdisk당신은 동의하지 않습니다 :

Disk /dev/sdb: 1953569134 sectors, 931.5 GiB

디스크의 요청 된 크기를 다시 확인하는 것이 좋습니다. 일반적으로 디스크 본체의 스티커에 인쇄됩니다. 실제로 931.5GiB (1TiB) 디스크를 가지고 있다면 두 개의 ~ 700GB ( gdisk클레임 931.5GiB) 파티션을 넣을 수있는 방법이 없습니다 . 따라서 gdisk올바른 데이터가있는 경우 더 큰 디스크를 얻거나 원본의 파일 시스템 내에서 1TB 이하의 실제 공간을 사용하는 경우 원본의 파일 수준 백업을 1TB로 수행해야합니다. 대상 디스크.

디스크가 2TB 모델로 표시되어 있으면 잘못 표시되었거나 HPA (Host Protected Area) 기능 에 문제가있는 것 입니다. 이 기능을 사용하면 모호한 목적으로 일정량의 디스크 공간을 “숨길”수 있습니다. 내가 본 온라인 게시물로 판단하면 때로는 잘못 설정되어 귀하와 같은 문제가 발생합니다. -N옵션을 사용하여이 기능을보고 변경할 수 있습니다 hdparm. 입력 sudo hdparm -N /dev/sdb하면 드라이브의 현재 HPA 설정이 표시됩니다. 이 기능이 활성화되어 있으면 옵션 man hdparm섹션을 입력 하고 읽으십시오 -N. 기본적으로 디스크를 -N재설정하고 전체 용량을 사용 하려면 디스크의 실제 섹터 수를 전달해야합니다 .