Fixing “HostDatastoreSystem.QueryVmfsDatastoreCreateOptions” Issue

Having recently made a right old mess of my home lab, I set about building it from scratch over the weekend. Having installed some nice, fresh builds of ESXi 5.0 I started adding in my SATA disks and began to create VMFS datastores on the hosts.

The first one worked ok. The second one didn’t for some reason. I got an error part way through the “Add Storage” wizard. The error stack wasn’t too helpful:

Call “HostDatastoreSystem.QueryVmfsDatastoreCreateOptions” for object “datastoreSystem-9″ on vCenter Server “svr-vcenter.vspecialist.co.uk” failed.

I didn’t think that there was a problem with the disk as I had been using it recently. On closing the error window though I noticed that underneath, in the properties area for the drive, the available space was showing nothing free and the partition format didn’t seem to be recognised either.

The simple explanation for why this was the case is that I had been using one of my lab servers to run Windows until recently and it still would have had partitions on from that. I’m fairly sure that there’s a VMware KB on this already but the KB site doesn’t seem to be working too well right at the moment so I thought I’d write up my solution anyway.

Now I could have taken the drive out and put it in another server to give it a “clean” but it’s quick enough to do it in ESXi using the SSH shell (which I had enabled previously.

Once logged in as root on the ESXi host, executing fdisk -l confirmed what I thought about the contents of the disk.

“Cleaning” it was also easily achieved using fdisk. To start fdisk and set it to point at the disk in question meant running the following:

fdisk /dev/disks/t10.ATA_____GB0750C4414_____________________________5QD4AQ8D____________

(The bit after /dev/disks is the unique name or ID of the disk in the server and can be seen in a couple of the screenshots above. It can also, mercifully, be entered / completed using command completion / the TAB key.)

Then it’s simply a matter of deleting the existing partitions using the command “d” and picking the various partitions to delete until they’re all gone.

FInally, the command “w” writes the changes to the disk and quits fdisk. Now, back to the vSphere Client…

After a quick rescan of storage devices, when trying to create a datastore on the disk there is now no error and the drive properties make a little more sense!

Michael is a Senior Consultant for Xtravirt. If it's got buttons or flashy lights on it then it'll probably be on his radar. When not "mending computers" (it's sometimes easier than explaining "cloud" to relatives), Michael provides essential education, entertainment and trampoline services to his two children.

Comments

  1. Chris. says

    Thanks for the help. This is certainly the easiest way I’ve spotted to resolve this issue.

  2. Andy says

    Thank you for the write-up. I was working with ESXi5 and a Synology but it didn’t have any partitions to delete but did say it would fix an error when I typed w. This was an annoying error that I hope vmware addresses in the future through the gui.

  3. Isaac L says

    Thanks for the advice, put me on the right track… in 5.1 you now have to use the partedUtil utility so you would delete partitions with the following command:

    partedUtil delete

    So in my case –
    partedUtil delete /dev/disks/naa.6001ec90cc92880018bc13430b87ffd6 1
    Thanks for the help!

  4. Rick Agnew says

    Unable to add a VMFS volume in ESX/ESXi 4.1 (1026315)
    Symptoms
    Unable to add VMFS volume in ESX/ESXi 4.1
    Adding storage using the Add Storage Wizard fails
    You see one of the following errors:
    Call “HostDatastoreSystem.QueryVmfsDatastoreCreateOptions” for object “datastorename” on vCenter Server “servername” failed.
    Call “HostStorageSystem.RetrieveDiskPartitionInfo” for object “storageSystem-XXXX” on vCenter Server “servername” failed.
    Cause
    This issue occurs when:
    The size of the LUN that is presented exceeds the maximum supported LUN size of 2TB minus 512 bytes.
    The partition table information does not contain valid partition configuration details.
    Resolution
    To resolve this issue:
    In the SAN management application, delete the LUN and recreate it with a size that is supported. Common sizes are 1.95TB and 1.99TB. See Configuration Maximums.
    Create a new partition entry. For more information, see Recovering a lost partition table on a VMFS volume (1002281).

  5. Occam says

    I was getting the same error with my MSA1000 SAN. I was reducing my 1.5TB LUN to chunks of 300GB. vSphere mounted the 2+ Luns without a problem, but Lun1 wouldn’t mount and gave this error. After deleing the Lun and array, it seems like the MSA1000 picked back up the data, including the GPT table which ended much later than the disk did. I tried all sorts of troubleshooting steps of deleting and recreating the array…

    In ssh… Using the partedUtil delete command, it just complained about it this over and over instead of deleting it.

    I tried to overwrite the beginning of the drive with ‘dd if=/dev/zero of=’, and cp, and cat… but it kept complaining that the disk wasn’t implemented. That parts over my head.

    Finally I used ‘partedUtil mklabel msdos’ and that seemed to work. I ran back to ESXi and it recreated the partition without an issue.

Leave a Reply

Your email address will not be published. Required fields are marked *

Powered by sweet Captcha