# gdisk /dev/yourdisk
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.
Identified 1 problems!
gdiskx使用起来可能有点神秘,但它在这里通过专家菜单( , )直接告诉您如何解决此问题e。
Command (? for help): x
Expert command (? for help): ?
e relocate backup data structures to the end of the disk
Expert command (? for help): e
Relocating backup data structures to the end of the disk
此时你可以调整分区或者直接写出来:
Expert command (? for help): v
No problems found. 15624933 free sectors (7.5 GiB) available in 1
segments, the largest of which is 15624933 (7.5 GiB) in size.
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/yourdisk.
parted也可以使用,当你使用任何命令时它都会要求你修复它:
# parted /dev/yourdisk print
Warning: Not all of the space available to /dev/yourdisk appears to be used,
you can fix the GPT to use all of the space (an extra 13671875 blocks)
or continue with the current setting?
Fix/Ignore?
fdisk将通过写入来调整 GPT 的大小。
# fdisk /dev/yourdisk
Welcome to fdisk (util-linux 2.39.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
GPT PMBR size mismatch (1953124 != 15624999) will be corrected by write.
The backup GPT table is not on the end of the device. This problem will be corrected by write.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
只需写入分区表
gdisk
即可。w
你会看见:说
y
是。如有必要请再次确认。完毕。或者使用
fdisk
. 你会看见:同样只需
w
写入分区表即可。完毕。使用示例
gdisk
:gdisk
x
使用起来可能有点神秘,但它在这里通过专家菜单( , )直接告诉您如何解决此问题e
。此时你可以调整分区或者直接写出来:
parted
也可以使用,当你使用任何命令时它都会要求你修复它:fdisk
将通过写入来调整 GPT 的大小。