How to fix GPT PMBR size mismatch?

I have one disk with one XFS partition:

Urządzenie Początek      Koniec     Sektory Rozmiar Typ
/dev/sdb1      2048 15628053134 15628051087    7,3T Linux - system plików
niezgodność rozmiaru PMBR GPT (3907050239 != 1953525167) zostanie naprawiona przy zapisie.
GPT PMBR size mismatch  (3907050239 != 1953525167) will be corrected by write.

The partition is made by Yast Partitioner on the new disk.

How do I fix this error?

This is English speaking category. Please, post commands output in English, or post in the appropriate language sections.

And always post the full command line and complete output, otherwise it is difficult to interpret it.

I suppose you follow the advice of some command (that you did not show) which tells you

But in general, this mismatch should not do any harm. Did you observe any issues? If not, better to not touch a working system :slight_smile:

It moved to the second disk (sdd) :slight_smile:

fdisk -l
Disk /dev/sda: 1,82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM001-1CH1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0002721a

Device     Boot Start        End    Sectors  Size Id Type
/dev/sda1        2048 3907028991 3907026944  1,8T 83 Linux


Disk /dev/sdb: 7,28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000VN004-3CP1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: B34F9681-10F2-46B2-B967-4F40E335F2F8

Device     Start         End     Sectors  Size Type
/dev/sdb1   2048 15628053134 15628051087  7,3T Linux filesystem


Disk /dev/sdd: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: TOSHIBA MQ01ABD1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
GPT PMBR size mismatch (3907050239 != 1953525167) will be corrected by write.


For information to understand:

Maybe use this for fix:

I guess I’ll have to live with this message. After restart, the message returned to /dev/sdb:

fdisk -l
Disk /dev/sda: 1,82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM001-1CH1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0002721a

Device     Boot Start        End    Sectors  Size Id Type
/dev/sda1        2048 3907028991 3907026944  1,8T 83 Linux


Disk /dev/sdb: 7,28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000VN004-3CP1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: B34F9681-10F2-46B2-B967-4F40E335F2F8

Device     Start         End     Sectors  Size Type
/dev/sdb1   2048 15628053134 15628051087  7,3T Linux filesystem
GPT PMBR size mismatch (3907050239 != 1953525167) will be corrected by write.

The gdisk command output doesn’t look promising:

gdisk /dev/sdb
GPT fdisk (gdisk) version 1.0.8

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): w

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

Do you want to proceed? (Y/N): 

Show

fdisk -t MBR -l
fdisk -t MBR -l
Disk /dev/sda: 1,82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM001-1CH1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0002721a

Device     Boot Start        End    Sectors  Size Id Type
/dev/sda1        2048 3907028991 3907026944  1,8T 83 Linux


Disk /dev/sdc: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000LX015-1U71
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start        End    Sectors  Size Id Type
/dev/sdc1           1 3907050239 3907050239  1,8T ee GPT

Partition 1 does not start on physical sector boundary.


Disk /dev/sdb: 7,28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000VN004-3CP1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start        End    Sectors Size Id Type
/dev/sdb1           1 4294967295 4294967295   2T ee GPT

Partition 1 does not start on physical sector boundary.

fdisk -l
Disk /dev/sda: 1,82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM001-1CH1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0002721a

Device     Boot Start        End    Sectors  Size Id Type
/dev/sda1        2048 3907028991 3907026944  1,8T 83 Linux
GPT PMBR size mismatch (3907050239 != 1953525167) will be corrected by write.


Disk /dev/sdc: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000LX015-1U71
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdc1           1 1953525167 1953525167 931,5G ee GPT

Partition 1 does not start on physical sector boundary.


Disk /dev/sdb: 7,28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000VN004-3CP1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: B34F9681-10F2-46B2-B967-4F40E335F2F8

Device     Start         End     Sectors  Size Type
/dev/sdb1   2048 15628053134 15628051087  7,3T Linux filesystem


Disk /dev/sdd: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: TOSHIBA MQ01ABD1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Well, as should be obvious this partition is indeed wrong, its size is twice the size of the physical disk. So, the error is correct. Again, nothing should be using this partition so it is entirely cosmetic. If it bothers you, make backup of the partition table and edit it setting the size to match the disk size.

@arvidjaar pointed this out … for the sdc drive / partition:

… but what about this drive / partition (sdb)? Is it by choice?
Or am I half-asleep and missed something

@rilicek

DOS portioning does not support really large drives

The partitions were created by Yast Partitioner.
/dev/sdb/ - is the new disk.
/dev/sdc/ and /dev/sdd/ - are the old disks - in Yast I deleted the partitions and created RAID 0.

It’s strange but the message appears once on one disk, once on the other.

fdisk -l
Disk /dev/sda: 1,82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM001-1CH1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0002721a

Device     Boot Start        End    Sectors  Size Id Type
/dev/sda1        2048 3907028991 3907026944  1,8T 83 Linux


Disk /dev/sdb: 7,28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000VN004-3CP1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: B34F9681-10F2-46B2-B967-4F40E335F2F8

Device     Start         End     Sectors  Size Type
/dev/sdb1   2048 15628053134 15628051087  7,3T Linux filesystem


Disk /dev/sde: 111,79 GiB, 120034123776 bytes, 234441648 sectors
Disk model: Crucial_CT120M50
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: C0C2E1D0-737D-4B18-A7DF-10028A29729A

Device         Start       End   Sectors  Size Type
/dev/sde1       2048      6143      4096    2M BIOS boot
/dev/sde2       6144     47103     40960   20M EFI System
/dev/sde3      47104  97753087  97705984 46,6G Linux filesystem
/dev/sde4   97753088 230246399 132493312 63,2G Linux filesystem
/dev/sde5  230246400 234441614   4195215    2G Linux swap


Disk /dev/sdd: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: TOSHIBA MQ01ABD1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
GPT PMBR size mismatch (3907050239 != 1953525167) will be corrected by write.


Disk /dev/sdc: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000LX015-1U71
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdc1           1 1953525167 1953525167 931,5G ee GPT

Partition 1 does not start on physical sector boundary.


Disk /dev/nvme0n1: 476,94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: SPCC M.2 PCIe SSD                       
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: 2653C7E2-488F-4F50-B188-7BEF0F45DA40

Device         Start   End Sectors Size Type
/dev/nvme0n1p1    34 32767   32734  16M Microsoft reserved


Disk /dev/md0: 1,82 TiB, 2000409722880 bytes, 3907050240 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 65536 bytes / 131072 bytes
Disklabel type: gpt
Disk identifier: D222117F-6A70-4A67-A124-8F176BAB11BE

Device     Start        End    Sectors  Size Type
/dev/md0p1  2048 3902708138 3902706091  1,8T Linux filesystem
fdisk -t MBR -l
Disk /dev/sda: 1,82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM001-1CH1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0002721a

Device     Boot Start        End    Sectors  Size Id Type
/dev/sda1        2048 3907028991 3907026944  1,8T 83 Linux


Disk /dev/sdb: 7,28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000VN004-3CP1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start        End    Sectors Size Id Type
/dev/sdb1           1 4294967295 4294967295   2T ee GPT

Partition 1 does not start on physical sector boundary.


Disk /dev/sde: 111,79 GiB, 120034123776 bytes, 234441648 sectors
Disk model: Crucial_CT120M50
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start       End   Sectors   Size Id Type
/dev/sde1  *        1 234441647 234441647 111,8G ee GPT

Partition 1 does not start on physical sector boundary.


Disk /dev/sdd: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: TOSHIBA MQ01ABD1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/sdc: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000LX015-1U71
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start        End    Sectors  Size Id Type
/dev/sdc1           1 3907050239 3907050239  1,8T ee GPT

Partition 1 does not start on physical sector boundary.


Disk /dev/nvme0n1: 476,94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: SPCC M.2 PCIe SSD                       
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: dos
Disk identifier: 0x00000000

Device         Boot Start        End    Sectors Size Id Type
/dev/nvme0n1p1          1 4294967295 4294967295   2T ee GPT


Disk /dev/md0: 1,82 TiB, 2000409722880 bytes, 3907050240 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 65536 bytes / 131072 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start        End    Sectors  Size Id Type
/dev/md0p1          1 3907050239 3907050239  1,8T ee GPT

Partition 1 does not start on physical sector boundary.

Maybe I should use gdisk?

gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.8

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. 
***************************************************************

Disk /dev/sda: 3907029168 sectors, 1.8 TiB
Model: ST2000DM001-1CH1
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): AFBF949B-06F9-4580-805A-E0B775455B8E
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2157 sectors (1.1 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048      3907028991   1.8 TiB     8300  Linux filesystem
gdisk -l /dev/sdb
GPT fdisk (gdisk) version 1.0.8

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 15628053168 sectors, 7.3 TiB
Model: ST8000VN004-3CP1
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): B34F9681-10F2-46B2-B967-4F40E335F2F8
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 15628053134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048     15628053134   7.3 TiB     8300  
gdisk -l /dev/sdc
GPT fdisk (gdisk) version 1.0.8

Warning! Disk size is smaller than the main header indicates! Loading
secondary header from the last sector of the disk! You should use 'v' to
verify disk integrity, and perhaps options on the experts' menu to repair
the disk.
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.

Warning! One or more CRCs don't match. You should repair the disk!
Main header: OK
Backup header: ERROR
Main partition table: OK
Backup partition table: ERROR

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: damaged

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Disk /dev/sdc: 1953525168 sectors, 931.5 GiB
Model: ST1000LX015-1U71
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): D222117F-6A70-4A67-A124-8F176BAB11BE
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 3907050206
Partitions will be aligned on 2048-sector boundaries
Total free space is 4344082 sectors (2.1 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048      3902708138   1.8 TiB     8300  
 gdisk -l /dev/sdd
GPT fdisk (gdisk) version 1.0.8

Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries in memory.
Disk /dev/sdd: 1953525168 sectors, 931.5 GiB
Model: TOSHIBA MQ01ABD1
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): AE208361-729F-4387-A568-77A0E6876101
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 1953525101 sectors (931.5 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
gdisk -l /dev/md0
GPT fdisk (gdisk) version 1.0.8

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/md0: 3907050240 sectors, 1.8 TiB
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): D222117F-6A70-4A67-A124-8F176BAB11BE
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 3907050206
Partitions will be aligned on 2048-sector boundaries
Total free space is 4344082 sectors (2.1 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048      3902708138   1.8 TiB     83

@rilicek

It’s what we use for large drives. My earlier post provided a URL article about its usage, advantage.

Here, again :+1: :

So, not only protective MBR, but also the GPT contains incorrect information.

What is on /dev/sdc1?

So, what you see is the partition table of your RAID0 disk. This is the very good example why one should never use the whole disk, but rather partition on it.

As I already said before - it will not cause any immediate harm, but this will confuse anyone who will look at your configuration. It will increase chances of destroying your data while trying to help in the good faith.

Ok, but I didn’t resize the partition.
And as I wrote: the gdisk command output doesn’t look promising:

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

Is one of the RAID drive.

Ok. I’ll try to make a raid on partitions. Does Yast support this, because I thought it wanted clean disks for RAID?

No, it is not. You really need to make some reading to understand the basic concepts. The /dev/sdc is one of the RAID drive. You should not be having /dev/sdc1 at all. What you see is mistake.

Of course it does.

I still don’t know why the GPT PMBR size mismatch message keeps popping up on /dev/sdb? Today it appeared again and I didn’t do anything with this disk. Yesterday, this message wasn’t there.

fdisk -l
Disk /dev/sda: 1,82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM001-1CH1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0002721a

Device     Boot Start        End    Sectors  Size Id Type
/dev/sda1        2048 3907028991 3907026944  1,8T 83 Linux


Disk /dev/sdb: 7,28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000VN004-3CP1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: B34F9681-10F2-46B2-B967-4F40E335F2F8

Device     Start         End     Sectors  Size Type
/dev/sdb1   2048 15628053134 15628051087  7,3T Linux filesystem
GPT PMBR size mismatch (3907050239 != 1953525167) will be corrected by write.

gdisk -l /dev/sdb
GPT fdisk (gdisk) version 1.0.8

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 15628053168 sectors, 7.3 TiB
Model: ST8000VN004-3CP1
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): B34F9681-10F2-46B2-B967-4F40E335F2F8
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 15628053134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048     15628053134   7.3 TiB     8300