I had to hold a training and decided to recycle some (relatively) old hosts and have them installed with vSphere 6.5.0d and most important vSAN 6.6 as I had 4 hosts, each with 5 SSDs
I thought I was lucky because I found vSphere 6.0 installed on them and thought that if I’m just upgrading all components, will be faster than a clean reinstall.
I was wrong!
The old cluster I destroyed, had vSAN installed (some colleague played with it last year) and when I created the new vSAN cluster, some of the disks could not be claimed as the partitions (or GPT Table) were corrupted.
It didn’t took me a long time to investigate which disks were not claimed of my new vSAN cluster but it took me a lot to actually clear the partition and fix the GPT table on each “broken” disk
I tried to delete them from vCenter via HTML5 and Flash clients, from ESXi via the HTML and C# client, but wasn’t successful so I tried also with partedUtil via SSH but still no success as I was getting the following error:
[root@vSAN-HOST666:~] partedUtil delete "/vmfs/devices/disks/naa.5002538250021a97" 1
Error: Input/output error during read on /dev/disks/naa.5002538250021a97
Error: The primary GPT table states that the backup GPT is located beyond the end of disk. This may happen if the disk has shrunk or partition table is corrupted. Fix, by writing backup table at the end? This will also fix the last usable sector appropriately as per the new reduced size. diskPath (/dev/disks/naa.5002538250021a97) diskSize (390721968) AlternateLBA (1948057599) LastUsableLBA (1948057566)
Warning: The available space to /dev/disks/naa.5002538250021a97 appears to have shrunk. This may happen if the disk size has reduced. The space has been reduced by (1557335632 blocks). You can fix the GPT to correct the available space or continue with the current settings ? This will also move the backup table at the end if it is not at the end already. diskSize (390721968) AlternateLBA (1948057599) LastUsableLBA (1948057566) NewLastUsableLBA (390721934)
Error: Can't have a partition outside the disk!
Unable to construct disk from device /vmfs/devices/disks/naa.5002538250021a97
I got really pissed off that I couldn’t delete those partitions and was close to admit defeat but I got lucky and found this VMware KB.
So… it seems that creating an MS-DOS partition on the respective “broken” disk you fix the issue
Here’s the command if you’re lazy enough not to click the above link:
partedUtil setptbl /vmfs/devices/disks/naa.5002538250021a97 msdos
After this step is completed, you just need to Erase partitions (vCenter or ESXi) and claim the disks in vSAN
This is why I love Mondays…