How to mount unmount datastore in esx6.5

Published by RSY Digital World on

RSY Digital World Logo

how to mount unmount datastore in esxi 6.5

In kind of scenario if you are not able to mount or unmount datastore using V-Center GUI I am going to share procedure how you can mount or unmount datastore on required ESXi servers.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 failover or failback scenario you have to perform either unmount or mount.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 lets see how to mount unmount datastore in esxi 6.5 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 lets see the steps you need to perform mount or unmount of datastore in ESXi server in conjunction with In V-center.Basic steps will be common like you obliviously need credentials to login 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 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 make 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 login 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 in ESXi

In this example we are going to use SSH method. Connect to ESX host using putty if you have enabled SSH. You need elevated privilege to perform below task on ESXi host. Please run below command to list all the datastore which is available on particular ESXi host. You can use console as well for the same purpose as mentioned in previous step. Either way it can be done. If you are sure to do via SSH you can skip enabling 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 in ESXi

In this example we are going to use SSH method. Connect to ESX host using putty if you have enabled SSH. You need elevated privilege to perform below task on ESXi host. Please run below command to list all the datastore which is available on particular ESXi host. You can use console as well for the same purpose as mentioned in previous step. Either way it can be done. If you are sure to do via SSH you can skip enabling ESXi shell.

(A) List available datastore in ESXi server.
[[email protected]:~]  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
-----truncated output---------------
[[email protected]:~]
(B) You can unmount datastore using the full path of data volume.
[[email protected]:~]  esxcli storage filesystem unmount -p /vmfs/volumes/5bc334fb-d370b76d-52fe-288023b1a488

 That,s all about how to mount unmount datastore in esxi 6.5.

||||| Cheers  |||||


RSY Digital World

RSY Digital World Founder & [email protected] Digital World. A UNIX Linux expert having a more than 20 years of experience in Solaris Red Hat Linux HP-UX AIX Unixware Open Server Veritas Storage Cloud Bigdata and many more in UNIX LINUX Infrastructure technologies.

0 Comments