The backup GPT table is not at the end of the disk, as it should be.

January 11, 2015
Tags: ,

I began seeing an error in my vkernel logs in ESXi.

    The backup GPT table is not at the end of the disk, as it should be. This might mean that another operating system believes the disk is smaller. Fix, by moving the backup to the end (and removing the old backup)? This will also fix this last usable sector as per the new size (7814037168) AlternateLBA (3519069871) LastUsableLBA (3519069838).

I had created the partition using a GParted Live CD, with the harddrive slaved into one of my Windows boxes. Then I removed the drive and added it to my ESXi server case, and created and formatted the drive as VMFS5. It showed the full volume space in vSphere so I assumed it had worked. I noticed, after the drive was filled to a certain degree, I could no longer copy any large files to it. It just wouldn’t work. I could read files just fine, but writing was not possible. It was then that I checked the logs and immediately spotted the recurring error messages.

After a bit of googling, I discovered there was a partedUtil fixGpt function withing ESXi. I SSHed into the host after first jotting down the datastore device location from vSphere (Configuration / Storage / Datastore Details).

I first checked the device from within the console: partedUtil getptbl

getptbl

Next I ran the fix partedUtil fixGpt. It prompts you to type ‘Fix’. Don’t do like I did the first three times and only type ‘F’. It won’t work.
I then immediately ran the check command again, getting a clean bill of heath this time.

fixGPT

The fixGPT command took only a second to work and did exactly what it was supposed to do. No more errors in the logs, and the entire drive’s capacity can be utilized.


Leave a Reply