GPT PMBR size mismatch (2147483647 != 8589934591) will be corrected by write. The backup GPT table is not on the end of the device. This problem will be corrected by write. Disk /dev/sda: 4 TiB, 4398046511104 bytes, 8589934592 sectors Disk model: QEMU HARDDISK 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: gpt Disk identifier: C21E9F23-xxxx-xxxx-xxxx-EA78EC110E55
Device Start End Sectors Size Type /dev/sda1 2048 2203647 2201600 1.1G EFI System /dev/sda2 2203648 2147481599 2145277952 1023G Linux filesystem
会发现提示分区表磁盘大小不匹配,执行resize2fs也会提示没有可用空间:
1 2 3
root@xxxx:~# resize2fs /dev/sda2 resize2fs 1.45.5 (07-Jan-2020) The filesystem is already 268159744 (4k) blocks long. Nothing to do!
此时执行parted -l,会提示有分区表错误,是否修复,输入fix即可。
1 2 3 4 5 6 7 8 9 10 11 12 13 14
root@node3:~# parted -l Warning: Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra 6442450944 blocks) or continue with the current setting? Fix/Ignore? fix Model: QEMU QEMU HARDDISK (scsi) Disk /dev/sda: 4398GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags:
Number Start End Size File system Name Flags 1 1049kB 1128MB 1127MB fat32 boot, esp 2 1128MB 1100GB 1098GB