How to unmount and mount datastore from esxi host

how to unmount and mount datastore in esxi host

In-kind of scenario if you are not able to mount or unmount datastore using V-Center GUI. I am going to share the procedure on how to unmount and mount datastore from esxi host.

This may be required during virtual machine failover or failback situation cleanly so that there will not be any adverse effect in your virtual infrastructure if it is not done cleanly.

During a failover or failback scenario, you have to perform either unmount or mount. The environment considered here will be of production environment with replication technology either from EMC or Hitachi.

It may be any other situation where you may need to perform mount or unmount of datastore.

So let’s see how to unmount and mount datastore from esxi host under V-Center and using command line operations. These are very intrusive steps and needs to be performed by senior administrators with full attention and care.

So finally let’s see the steps you need to perform mount or unmount of datastore in the ESXi server in conjunction with In V-center. Basic steps will be common like you obliviously need credentials to log in to V-Center and ESXi server with privilege access which mostly server administrators do have.

It is assumed here that you have already logged in to your V-Center.

V-Center Procedure

1. Select ESXi Server where datastore to be mounted or unmounted.

2.Go to Configure.

3.Select Security Profile

4.In Lockdown Mode Tab makes Lockdown mode to Disabled State if it is not.

disable lockdown mode

 

 

 

 

 

 

 

5.Under Services Tab please Enable ESXi Shell or SSH to allow you to log in to ESX host either via console or via SSH to unmount datastore depending upon your preference how you want to perform mount or unmount action in ESXi server.

 

 

 

 

 

 

6. How to mount datastore from esxi host

In this example, we are going to use the SSH method. Connect to ESX host using putty if you have enabled SSH. You need the elevated privilege to perform the below task on the ESXi host. Please run the below command to list all the datastore which is available on a particular ESXi host.

You can use the console as well for the same purpose as mentioned in the previous step. Either way, it can be done. If you are sure to do via SSH you can skip enabling the ESXi shell.

(A) Look for the datastore that needs to be mounted using below command
       # esxcfg-volume -l | grep -i A_V_VMSRV001_219
(B) Mount the datastore using below command
       # esxcfg-volume -M A_V_VMSRV001_21

7. How to unmount datastore from esxi host

In this example, we are going to use the SSH method. Connect to ESX host using putty if you have enabled SSH. You need the elevated privilege to perform the below task on the ESXi host. Please run the below command to list all the datastore which is available on a particular ESXi host.

You can use the console as well for the same purpose as mentioned in the previous step. Either way, it can be done. If you are sure to do via SSH you can skip enabling the ESXi shell.

(A) List available datastore in the ESXi server.

# esxcli storage filesystem list

Mount Point        Volume Name    UUID    Mounted  Type   Size           Free

/vmfs/volumes/5cd675b2-ffbf2bae-cade-00110a699b4c  A_V_VMSRV001_1      5cd675b2-ffbf2bae-cade-00110 a699b4c     true  VMFS-5                3298266447872   833874821120 

You can unmount datastore using the full path of data volume.

# esxcli storage filesystem unmount -p /vmfs/volumes/5bc334fb-d370b76d-52fe-288023b1a488

That`s all about how to unmount and mount datastore in esxi host.I hope you will find it helpful.

 

||||| Cheers  |||||