GPT PMBR size mismatch will be corrected by write: what it means and how to fix it

fdisk shows "GPT PMBR size mismatch will be corrected by write" after a disk got bigger, usually a resized VM disk. It's a warning, not damage. Fix it with sgdisk -e or parted, or use growpart to fix it and grow the partition in one step.

Share
fdisk warning GPT PMBR size mismatch will be corrected by write
GPT PMBR size mismatch (2097151 != 6291455) will be corrected by write.
The backup GPT table is not on the end of the device.

You see this in fdisk -l when a GPT disk got bigger after it was partitioned. Typical case: you grew a VM disk in Proxmox, VMware or your cloud panel from 1 GB to 3 GB. The partition table still describes the old 1 GB disk, and the backup GPT header sits where the old disk ended instead of at the new end. Nothing is broken and no data is at risk. fdisk is just telling you the table doesn't match the disk anymore.

Quickest fix, which moves the backup GPT to the real end of the disk:

sudo sgdisk -e /dev/sda

If you resized the disk because you want the space, skip that and run growpart instead. It fixes the GPT and grows the partition in one go (see Use the new space).

What the numbers mean

2097151 != 6291455 is the last sector the protective MBR (PMBR) thinks the disk has, compared with the real last sector. With 512-byte sectors, 2,097,152 sectors is 1 GiB and 6,291,456 is 3 GiB. So this disk went from 1 GiB to 3 GiB.

A GPT disk keeps two copies of the partition table, one at the start and a backup at the very end. When the disk grows, the backup copy stays where the old end used to be. That's the second line, "The backup GPT table is not on the end of the device".

Four ways to fix it

All four were tested on a GPT disk image grown from 1 GB to 3 GB (util-linux 2.39.3, parted 3.6, gdisk 1.0.10 on Ubuntu 24.04), and each one removed both warnings. Replace /dev/sda with your disk. Check with lsblk first, and use the whole disk, not a partition like /dev/sda1.

1. sgdisk -e (one command, no prompts)

sudo sgdisk -e /dev/sda

-e moves the backup GPT structures to the end of the disk. It's the easiest one to script. If sgdisk isn't installed, it's in the gdisk package on Debian and Ubuntu (sudo apt install gdisk) and on RHEL (sudo dnf install gdisk).

2. parted, answer Fix

sudo parted /dev/sda print

parted notices the extra space and asks:

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 4194304 blocks) or continue with the current setting?
Fix/Ignore? Fix

Type Fix. parted -l gives the same prompt for every disk with the problem.

3. fdisk, just write

The message literally says "will be corrected by write" (see the fdisk man page for how it handles GPT), so open the disk in fdisk and write without changing anything:

sudo fdisk /dev/sda

At the Command (m for help): prompt type w and press Enter. fdisk rewrites the PMBR and the backup table for the new size.

4. growpart (fix + grow the last partition)

sudo growpart /dev/sda 2

Note the space: disk, then partition number. On the test image this fixed the GPT and grew partition 2 from 923M to 2.9G in one step:

CHANGED: partition=2 start=206848 old: size=1890271 end=2097118 new: size=6084575 end=6291422

growpart comes from cloud-guest-utils on Debian and Ubuntu and cloud-utils-growpart on RHEL. Most cloud images already have it.

After any of these, you may see "The kernel is still using the old partition table". Run sudo partprobe /dev/sda, or reboot if the disk is in use and partprobe can't update it.

Use the new space

Fixing the GPT only makes the table match the disk. The free space is still unallocated. Here's the full sequence after you grow a VM disk.

1. Make the guest see the new size. Virtio disks (vda) on Proxmox and KVM usually update on their own. For SCSI disks (sda) trigger a rescan:

echo 1 | sudo tee /sys/class/block/sda/device/rescan
lsblk /dev/sda

2. Grow the partition (this also fixes the GPT warning):

sudo growpart /dev/sda 2

3. Grow what's inside the partition. Which command depends on what's there. Check with lsblk -f.

ext4 directly on the partition:

sudo resize2fs /dev/sda2

XFS (default on RHEL, Rocky, Alma). It takes the mount point, not the device:

sudo xfs_growfs /

LVM, which is the default on Ubuntu Server. Grow the physical volume, then the logical volume, and let -r resize the filesystem in the same step:

sudo pvresize /dev/sda3
sudo lvextend -r -l +100%FREE /dev/ubuntu-vg/ubuntu-lv

Use your own partition number and LV path (sudo lvs shows them). For a longer walkthrough, see resizing a VMware virtual disk and LVM and resizing a Linux partition from the command line.

All of these work online on a mounted root filesystem. Growing is safe. Shrinking is a different story and needs a backup first.

When to ignore it

You don't have to fix this warning on a USB stick you wrote an ISO to with dd, Rufus or Etcher. Hybrid ISO images carry a partition table sized for the image, not the stick, so fdisk -l will often show the same message. The stick boots fine as it is, and the next time you reformat it the warning goes away. If the stick also shows the wrong capacity in Windows or Disks, see how to fix a USB drive showing the wrong size.

FAQ

Is "GPT PMBR size mismatch" dangerous?

No. It's a warning about metadata, not about your files. The partitions and data are where they were. Fix it so tools stop complaining and so you can use the extra space.

Will sgdisk -e or parted Fix delete data?

No. They rewrite the protective MBR and move the backup GPT header to the end of the disk. Partition entries stay the same. As with any partition-table change, having a backup or a VM snapshot first is still a good habit.

Do I need to reboot?

Usually not. Run sudo partprobe /dev/sda. If the kernel refuses because the disk is busy (common for the root disk on older kernels), reboot once.

I fixed it but df still shows the old size

That's expected. The GPT fix doesn't grow anything. Follow Use the new space: growpart, then resize2fs, xfs_growfs or lvextend.

Why does it say "will be corrected by write" if fdisk -l doesn't write?

fdisk -l only reads. The correction happens when you open the disk in fdisk and save with w, or when another tool rewrites the table.