Short answer: esxcli storage is the ESXi shell namespace for everything below the datastore: HBAs, rescans, devices, paths, multipathing, VMFS, NFS and Fibre Channel. The commands you use most are core adapter list, core adapter rescan, core device list, core path list, nmp device list, san fc list, filesystem list and vmfs unmap. The syntax below is valid for ESXi 8.0 U1 and later. Check the ESXCLI reference for your exact build.
For the whole esxcli storage tree across releases, open the interactive ESXCLI mindmap and search for a namespace such as storage nmp.
esxcli storage namespaces in ESXi 8.0 U1
The ESXCLI 8.0.1 reference lists these sub-namespaces:
| Namespace | Used for |
|---|---|
| core | Adapters, devices, paths, claim rules, PSA plugins |
| nmp | Native Multipathing Plugin: PSP and SATP per device |
| hpp | High-Performance Plugin (local NVMe, NVMe-oF) |
| san | FC, FCoE, iSCSI and SAS adapter details and statistics |
| fpin | Fabric Performance Impact Notifications |
| filesystem | Mounted volumes, mount/unmount, rescans |
| vmfs | VMFS extents, UNMAP, snapshots and resignaturing |
| nfs, nfs41 | NFS v3 and v4.1 datastores |
| vvol | vVols storage containers, protocol endpoints, VASA providers |
| osdata | ESXi OSData partition |
| iofilter, vflash | I/O filters and the legacy Flash Read Cache |
Adapters and rescans
# List all storage adapters (vmhbaX), driver and link state
esxcli storage core adapter list
# Rescan all adapters for new devices and remove dead paths
esxcli storage core adapter rescan --all
# Rescan a single adapter
esxcli storage core adapter rescan --adapter vmhba2
# Pick up new VMFS volumes after the rescan
esxcli storage filesystem rescan
Devices and paths
# All devices known to PSA, or one device
esxcli storage core device list
esxcli storage core device list --device naa.600a098038303053453f463045727a4a
# All paths, or the paths of one device
esxcli storage core path list
esxcli storage core path list --device naa.600a098038303053453f463045727a4a
# VAAI primitive support per device
esxcli storage core device vaai status get
The naa. identifier is only an example. Use core device list to find yours, or see Broadcom KB 316540 Identifying disks when working with VMware ESXi.
Multipathing: NMP and HPP
# Devices claimed by NMP with their SATP and PSP
esxcli storage nmp device list
# Available SATPs and their default PSP
esxcli storage nmp satp list
# Set Round Robin on one device
esxcli storage nmp device set --device <naa.id> --psp VMW_PSP_RR
# Switch paths after every I/O (only if your array vendor recommends it)
esxcli storage nmp psp roundrobin deviceconfig set --device <naa.id> --type iops --iops 1
# Devices claimed by the High-Performance Plugin (NVMe)
esxcli storage hpp device list
Fibre Channel: esxcli storage san fc
# WWNN, WWPN, port state, speed and fabric name per FC HBA
esxcli storage san fc list
# Link errors, loss of sync, frame counters
esxcli storage san fc stats get
# LIP reset of one FC adapter
esxcli storage san fc reset --adapter vmhba2
san fc reset performs a LIP reset. All paths through that HBA drop for a moment. Run it only when the device has a working path through another adapter, or in a maintenance window.
VMFS: filesystem list, UNMAP and snapshots
# Mounted volumes with UUID, type, size and free space
esxcli storage filesystem list
# Extents (backing devices) of each VMFS datastore
esxcli storage vmfs extent list
# Manual space reclamation on a thin-provisioned LUN
esxcli storage vmfs unmap --volume-label Datastore01 --reclaim-unit 200
# Unresolved snapshot/replica volumes (after array snapshot or DR test)
esxcli storage vmfs snapshot list
esxcli storage vmfs snapshot mount --volume-label Datastore01
esxcli storage vmfs snapshot resignature --volume-label Datastore01
Use mount when the original volume is not visible to the host (for example at a DR site). Use resignature when the original and the copy must be mounted side by side.
NFS datastores
esxcli storage nfs list
esxcli storage nfs add --host 192.168.10.20 --share /vol/ds01 --volume-name NFS-DS01
esxcli storage nfs41 list
esxcli storage nfs41 add --hosts 192.168.10.20,192.168.10.21 --share /vol/ds02 --volume-name NFS41-DS02
For more NFS client tuning, see nConnect support in the ESXi NFS client.
Safely detaching a LUN
Unmount the datastore first (vSphere Client, or esxcli storage filesystem unmount), then detach the device before the array team unmaps it:
esxcli storage core device set --device <naa.id> --state off
esxcli storage core device detached list
For the other namespaces (network, system, software, vSAN), see my esxcli commands for ESXi 8.0 overview and new ESXCLI commands in vSphere 8.0.
Further reading
- Jason Massae (VMware): vSphere 8.0 U1 esxcli Storage Commands (the original document this page used to point to)
- Broadcom Developer: ESXCLI 8.0.1 reference, esxcli storage (switch the version for other builds)
- Broadcom KB 316540: Identifying disks when working with VMware ESXi
