我最近通过我的主机控制面板将VPS从50GB SSD调整为300GB SSD.我现在正在尝试使用fdisk调整主分区的大小,以便能够使用所有新空间.但是,fdisk在启动时给我一个警告:
GPT PMBR size mismatch (104857599 != 629145599) will be corrected by w(rite). GPT PMBR size mismatch (104857599 != 629145599) will be corrected by w(rite).
很明显它是以前尺寸的六倍,因为我从50GB变为300GB.所以,我决定按照提示写下表…
Command (m for help): w GPT PMBR size mismatch (104857599 != 629145599) will be corrected by w(rite). fdisk: Failed to write disklabel: Invalid argument
..哪个不起作用.尽管有许多搜索查询,我无法找到导致该错误的原因.我不使用LVM,我的分区表如下所示:
Disk /dev/vda: 300 GiB,322122547200 bytes,629145600 sectors 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: 30D92031-0C13-42FF-AC16-D34F36DD3907 Device Start End Sectors Size Type /dev/vda1 2048 32767 30720 15M BIOS boot /dev/vda2 32768 16809983 16777216 8G Linux swap /dev/vda3 16809984 104857566 88047583 42G Linux filesystem
注意磁盘如何将其显示为300GiB,因此它确实识别尺寸变化.