如何修复GPT PMBR大小不匹配问题?

Virtualization

1 前言

一个问题,一篇文章,一出故事。
笔者今天需要在Proxmox Virtual Enviroment环境中,如果执行底层的VM磁盘扩容,则会VM进入系统后,则会出现GPT PMBR大小不匹配问题。
于是笔者需要整理出解决此问题的章节。

2 最佳实践

2.1 部署PVE环境

关于PEV环境,如有需要请参阅,

如何创建Proxmox VE集群环境?

2.2 修复安装后VM磁盘变小问题

2.2.1 检查分区表

fdisk -l

可见如下显示,

GPT PMBR size mismatch (246303 != 67108863) will be corrected by write.
The backup GPT table is corrupt, but the primary appears OK, so that will be used.
The backup GPT table is not on the end of the device.

注:这表明分区表信息不一致

2.2.2 修复GPT分区表

gdisk /dev/sda

修复向导如下,

#...
Warning! Main and backup partition tables differ! Use the 'c' and 'e' options
on the recovery & transformation menu to examine the two tables.

Warning! One or more CRCs don't match. You should repair the disk!
#...
Command (? for help): w
Warning! Secondary header is placed too early on the disk! Do you want to
correct this problem? (Y/N): y
Have moved second header and partition table to correct location.

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

Do you want to proceed? (Y/N): y
#...
没有评论

发表回复

Virtualization
如何在线扩容磁盘块设备分区?

1 前言 一个问题,一篇文章,一出故事。 笔者今天需要在Proxmox Virtual Enviro …

Virtualization
如何修复PVE VM磁盘比实际分配小的问题?

1 前言 一个问题,一篇文章,一出故事。 笔者今天需要在Proxmox Virtual Enviro …

Virtualization
如何OVS配置Proxmox VE双活Trunk线上联思科交换?

1 前言 一个问题,一篇文章,一出故事。 本章将总结Proxmox VE的网卡以Trunk模式上联思 …