Cannot format hard disk with VMFS5 after removing it from RAID array
Today I tried to install the new NexentaStor 4.0.1 on my x3650 M2 with local harddisks. To get the best performance my plan was to pass-through all local disks to the VM. For that I had to remove all RAID arrays that are currently configured across my 8 internal drives. After deleting the RAID arrays I started the host. When my host was up and running I tried to format one of the disks an got the following error message.
Call “HostDatastoreSystem.QueryVmfsDatastoreCreateOptions” for object “ha-datastoresystem” on ESXi “xxx.xxx.xxx.xx″ failed.
I have done this with several other disks and it looked like that only 3 had the problem. I enabled SSH and connected to the host.
There i used this command to list all the available devices:
ls -lha /vmfs/devices/disks/
This was the shortened output
As you can see there is a partition on the disks I couldn’t format.
The following command had shown me some information about the device.
partedUtil getptbl /vmfs/devices/disks/naa.5000c50023397a33
This was the output:
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.5000c50023397a33) diskSize (286748000) AlternateLBA (570310655) LastUsableLBA (570310622)
Warning: The available space to /dev/disks/naa.5000c50023397a33 appears to have shrunk. This may happen if the disk size has reduced. The space has been reduced by (283562656 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 (286748000) AlternateLBA (570310655) LastUsableLBA (570310622) NewLastUsableLBA (286747966)
Error: Can’t have a partition outside the disk!
Unable to read partition table for device /vmfs/devices/disks/naa.5000c50023397a33
It looks like that after deleting the RAID array not all VMFS partition table information was deleted too, so I had to clear it manually.
To do this simply create a normal msdos partition on the affected disks with this command:
partedUtil setptbl /vmfs/devices/disks/naa.5000c50023397a33 msdos
After setting a new partition I was able to format the disk with VMFS5.
Thanks. Helped me to resolve my issue. It worked.
Thanks. Happy that it was useful for you.
Thanks, that did it! 🙂
Perfect !! You are great. Worked completely.
Hey thanks a million for publishing this. I have spent over 3 hours trying to get this working before coming across your article.
Thanks you saved me from a restless night 🙂
Thanks Teun. Happy to help! 🙂
It helps me to resolve the some issue with ESXi 6.0.0 and a HP Proliant ML310e Gen8 v2 with RAID 1
Glad to hear that it was useful! Thanks. Really appreciate the comment!
It works. Thank you so much!
You’re welcome. happy to help! 🙂
Funcionó a la perfección, Muchas gracias
Man you awesome! Save my day.
This worked a charm on my HP MicroServer Gen8 G1610T! Thanks very much!
perfect, it work. many thanks
Thanks a lot for helpful post. It resolved my issue.
Awsome, it’s worked ! Thanks so much 😉
great piece of information … well done
First i found how to down console at the installation time
Then first i used partedUtil
And thanks for such solution no need to play with multiple live cd , thanks Manfred
Nice. This worked for me . Thanks 🙂
Thank you, I had an ssd setup as a dell perc h700 cachecade as I wanted to see what difference it made but after playing thought I’d rather just have the ssd as this is only a esxi box for labs. Couldn’t get the drive to add as a datastore even tried diskparted.
Thanks! Worked for me….
I spent several hours working with VMware enterprise support and they came to the conclusion that i would need to pull the drives and wipe them using another server. This command fixed it instantly. Thank you so much!
You’re welcome. Happy that it worked. Do you maybe have the SR number for the case?
Thanks,
Fred
Har liknande problem när jag ska installera ESXi 6.7 på en HP Server. vart skriver jag partedUtil setptbl /vmfs/devices/disks/naa.5000c50023397a33 msdos ?