Storage Management
A virtual disk is basically a file that stores the operating system, program files, and other data related to a virtual machine. It is generally a single file or a set of files that can be copied, moved, archived, and backed up just like any ordinary content file.
COMMAND: vicfg-scsidevs or esxcli storage core device list
This command helps in displaying the available logical unit numbers (LUNs) and mappings for each VMFS volume to its corresponding partition. Here is an example:
Listing all logical devices known on the system
~ # esxcli <conn_options> storage core device list
OR
~ # vicfg-scsidevs <conn_options> --list
COMMAND: vicfg-mpath or esxcli storage core path
This command helps in obtaining information about Fibre Channel or iSCSI LUNs and to change a path's state. Here are some examples:
Listing all devices, along with corresponding paths, state of the path, adapter type, and other information
~ # esxcli <conn_options> storage core path list
OR
~ # vicfg-mpath <conn_options> --list-paths
Setting the state of a LUN path to "off"
~ # esxcli <conn_options> storage core path set --state off --path vmhba32:C0:T1:L0
OR
~ # vicfg-mpath <conn_options> --state off --path vmhba32:C0:T1:L0
COMMAND: vicfg-rescan adapter rescan or esxcli storage core adapter rescan
This command helps perform a rescan operation each time the storage setup is reconfigured. Here is an example:
Rescanning a storage adapter
~ # esxcli storage core adapter rescan --adapter=TestAdapter
OR
~ # vicfg-rescan <conn_options> TestAdapter
COMMAND: esxcfg-mpath
This command helps in displaying and setting (enabling and disabling) all paths from a host to its storage devices. Here is an example:
Enabling or disabling a path
~ # esxcfg-mpath -P path -s state
COMMAND: esxcfg-info
This command helps in obtaining detailed information about the host from which the command is fired. Its output can be stored directly into a text file, allowing direct documentation of the host configuration. Here are some examples:
Checking the ESX/ESXi host for host hardware info
~ # esxcfg-info | less i
Filtering out information about a specific system
~ # esxcfg-info | grep 'system uuid'