Sunday , September 17 2017
Home > ESXi 6.0 > Force Mount VMFS datastore using esxcli

Force Mount VMFS datastore using esxcli

VMware vSphere ESXi uses VMFS volumes as a datastore to store the data of the virtual machines & other files. When you add the new LUN that LUN is formatted using VMFS & mapped to the ESXi as a datastore. You can map multiple datastore with single ESXi or multiple ESXi. Once the datastore is created you can use it to store the virtual machine files or other files such as ISO,Scripts etc.

Sometimes you may find that there is some problem while accessing the datastore. at that time you always try to check that the datastore is mounted or not. If the datastore gets unmounted then you need to mount it again.

Today while working on one of the site. I came to find an issue regarding to the datastore presented to the ESXi. Let’s now come to the actual scenario there were multiple hosts are there & multiple LUN’s were mounted as datastore to all the hosts. everything was working fine but some of situation occurred & all the hosts was rebooted abruptly.  so after starting of all the hosts i have powered on the VM’s but at the time i found that all the datastore was visible & mounted to all the hosts except one datastore. So i was looking into the issue & also checked from the storage team but everything was fine from storage so i need to look into ESXi only. When i looked into the Configuration > Storage the LUN was visible to esxi but i can’t able to mount it using the add storage wizard.

This may happens when the LUN is detected as snapshot LUN to the ESXi.

I researched on net & found that we can mount the force VMFS datastore in some scenarios. Then i found one of the VMware KB where they have mentioned all the details. So i thought to share with you guys this information.

First we have to check the snapshot LUN which are available for mounting using below command :

# esxcli storage vmfs snapshot list

You may see output similar to:

Volume Name: LUN-1-DS
VMFS UUID: 
Can mount: true
Reason for un-mountability:
Can resignature: true
Reason for non-resignaturability:
Unresolved Extent Count: 1

Now as we can see that we can mount the Volume again. To mount the Volume run the below command :
You can mount using Volume Name or UUID of the volume also.

# esxcli storage vmfs snapshot mount -l Volume-Label-Name(Volume Name)

In my case it will be :

# esxcli storage vmfs snapshot mount -l LUN-1-DS

Using UUID :

# esxcli storage vmfs snapshot mount -u uuid

Note: This was tested in VMware vSphere ESXi 6.
For more information check VMware KB : 1011387

That’s it for Today Friends. I Hope you liked reading this post & If you find anything more to be added or removed feel free to write it in our comments. If you find it useful You are Feel free to share this on social media to help others & spread knowledge.
If you have any query on any thing you are free to write it in our comments section & we will make sure to provide you the better solution as soon as possible.

Join Our LinkedIn Group to get Updates & Discussions : Mastering VMware.
Checkout our Facebook Group for discussions & more.
You can also Like & Share our Facebook Page for Latest Updates.

About Mayur Parmar

Hi I am Mayur Parmar. Independent Author & Founder of Mastering VMware. I am working in IT industry for more than 2 Years with knowledge of VMware , Microsoft Server's, Linux Server's.

Check Also

drs-lens

VMware Fling: DRS Lens

DRS Lens is an fling from VMware which helps to monitor your vSphere DRS clusters. …

Leave a Reply

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

two × three =