ESXi Command LinevSphere Guides

ESXi Commands Part-6 : Managing Storage using esxcli

In this series we will see on how you can easily get information using commands in ESXi & how you can manage the ESXi using esxcli command line. This is the sixth part where we will see some of the commands on how you can administer & manage the storage on esxi using the esxcli. esxcli is the command line interface framework in vmware vsphere which provides modular architecture for the components “Namespace” running in VMkernel. esxcli is powerful command line interface which provides very helpful information. you don’t need to install any other software to run esxcli. esxcli can be directly run into the ESXi using Putty. Information you will find that can be very useful in the time of troubleshooting the esxi server issues.

In this post we will see on by using “esxcli storage” how we can administer & manage storage on esxi . You may find very useful commands in this post which you will be using on daily basis using GUI from vsphere client but you can also do it using esxcli command line if you don’t have the vsphere client. Below is the list of things you can do to get & manage the esxi networking using esxcli. You will find some of the advanced management commands which should not be used if you don’t know about it properly.

Available Namespaces with esxcli storage :

  • core : VMware core storage commands. It will help you to do operations on core storage such as adapters, devices, paths etc.
  • nfs : It will help you to create, manage, and remove Network Attached Storage filesystems.
  • nfs41 : It will help you to create, manage, and remove NFS v4.1 filesystems.
  • nmp : VMware Native Multipath Plugin (NMP). This is the VMware default implementation of the Pluggable Storage Architecture.
  • san : It will help you to do IO device management operations to the SAN devices on the system. SAN devices includes FC, FCoE, iSCSI, SAS.
  • vflash :  virtual flash Management Operations on the system.
  • vmfs : It will help you to do various VMFS operations using commands.
  • vvol : Operations pertaining to Virtual Volumes.
  • filesystem : Operations pertaining to filesystems, also known as datastores, on the ESX host.
  • iofliter : IOFilter related commands.

This above are all the available Namespaces which you can use with esxcli storage. some of the advanced namespaces which can only be used with the caution or with vmware support engineers.

There is an syntax of running the each command using the esxcli. In this post we will see on how we can use the command “esxcli storage” to manage the storage on esxi.

Syntax of the command is as follows:

esxcli storage {cmd} {cmd options}

esxcli storage is the command which you can run directly into ESXi without any option. But to get into deeper you will have to use the Namespaces with the command.
Where first {cmd} will be the any of the namespace available above & after you can use the available namespaces or available commands w.r.t get the information.

We will only see the some of commonly used namespaces.

nfs Namespace :

command:
 esxcli storage nfs

ESXI-Commands-6-storage-nfs

Here you will get 1 namespace & 3 commands.
Available Namespaces:
param : Operations on Volume parameters of NAS filesystem.

Available Commands:
add : It will help you to add the new NAS volume to the ESXi host & you can also mount it.
list : It will help you to list the  currently active NAS Volumes on the ESXi host.
remove : It will help you to remove the existing NAS Volumes from ESXi host.

nfs41 Namespace works in a same way as a nfs Namespace.

san Namespace :

command:
 esxcli storage san

ESXI-Commands-6-storage-san

Here you will get 4 namespaces.
Available Namespaces:
fc : It will help you to to IO Device Management Operations to the FC Adapters on the system.
fcoe : It will help you to to IO Device Management Operations to the FCoE Adapters on the system.
iscsi : It will help you to to IO Device Management Operations to the software iSCSI Adapters on the system.
sas : It will help you to to IO Device Management Operations to the SAS Adapters on the system.

vmfs Namespace :

command:
 esxcli storage vmfs

ESXI-Commands-6-storage-vmfs

Here you will get 5 namespaces & 2 commands.
Available Namespaces:
snapshot: It will help you to manage snapshots.
extent : It will help you to manage VMFS extents.
host : It will help you to manage the hosts which is accessing the VMFS Volume.
lockmode : It will help you to manage VMFS array locking mode.
pbcache : It will help you to manage VMFS Pointer Block Cache statistics.

Available Commands:
unmap : It will help you to Reclaim the space by unmapping free blocks from VMFS volume.
upgrade : It will help you to upgrade VMFS Volumes.

filesystem Namespace :

command:
 esxcli storage filesystem

ESXI-Commands-6-storage-filesystem

Here you will get 5 commands.
Available commands:
automount : It will help you to mount the known datastores which are not explicitly unmounted.
list : It will help you to list all the volumes which are available on the ESXi host.
mount : It will help you to mount the volumes to the ESXi host.
rescan : It will help you to scan the storage devices which can mountable.
unmount : It will help you to unmount the volumes from ESXi hosts.

Here we haven’t posted about all the Namespaces because some of them are the more advanced which can only be with requested by VMware support. You can also try this esxcli namespaces & commands to manage the esxi about server’s in your environment.

Checkout our Posts on ESXi Command Line Series:-

ESXi Commands Part-1 : Basic commands.

ESXi Commands Part-2: Finding Hardware information using esxcli

ESXi Commands Part-3 : Managing ESXi using esxcli commands

ESXi Commands Part-4 : Managing ESXi Networking using esxcli commands

ESXi Commands Part-5 : Finding VM information using esxcli

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.

Mayur Parmar

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

Related Articles

2 Comments

    1. Hi Kalyan,
      Yes you can disable log generation but that can be done using command line for ESXi.

Leave a Reply

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

Back to top button