Mounting ESXi Datastore from CLI

Moving some storage around this evening created a situation where my primary VM datastore was imported on one of my hosts with a new signature file.  This had repercussions on the other host in the cluster, causing a situation where when the datastore was being detected through the iSCSI adapter, but not being displayed in the storage window.  If the storage was manually added through the vSphere GUI, it would only allow a reformat.

CLI to the rescue.

First, you will need to find the volumes on the system using “esxcfg-volume -l”.  At that point, you can verify the disk in question – in this case it has the label of esxistorage0.openfiler0.destephen.local.  The next command “esxcfg-volume -m <VMFS UUID>” ran is the command that actually initiates the mouting of the disk.

ESXi CLI Commands

 

When the signature was updated on a different host, the UUID changed which started this issue. This link outlines the details around resignaturing VMFS copies and the steps taken within CLI.

The last step is to initiate a rescan of the datastores within the GUI.  At that point, your datastore should be mounted.

ESXi Datastores Mounted

Leave a Reply

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