I began seeing an error in my vkernel logs in ESXi.
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
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.
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.