Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

List of vSphere 4 and vSphere 5 storage commands (2009880)

Purpose

This article provides a list of various storage commands in vSphere 4 and vSphere 5.

Resolution

 This table lists the various storage commands in vSphere 4 and vSphere 5: 

Description vSphere 4 command vSphere 5 command
List all paths (long form) esxcfg-mpath -l esxcli storage core path list
List paths for a single device (long form) esxcfg-mpath -ld [device] esxcli storage core path list -d [device]
List paths for a single device short form) esxcfg-mpath -Ld [device]
vsish -e ls /storage/scsifw/devices/[device]/paths/

Note: This command is also also valid in vSphere 4.
List all disks and partitions fdisk -lu esxcli storage core device partition list
List a single disk's partitions fdisk -lu /vmfs/devices/disks/[device] esxcli storage core device partition list -d [device]
List all disk attributes esxcfg-scsidevs -l esxcli storage core device list
List a single disk's attributes esxcfg-scsidevs -ld [device] esxcli storage core device list -d [device]
List all filesystems mounted to the system esxcfg-scsidevs -m
esxcli storage filesystem list

Note: This command also shows unmounted and active filesystems.
List the physical device used by a filesystem vmkfstools -P /vmfs/volumes/[datastore] esxcli storage vmfs extent list
Show NMP information, such as PSP, SATP, and preferred esxcli nmp device list esxcli storage nmp device list
Show available PSPs esxcli nmp psp list esxcli storage nmp psp list
Change PSP esxcli nmp device setpolicy -d [device] --psp [PSP name] esxcli storage nmp device set -d [device] -P [PSP name]
Show claimrules esxcli corestorage claimrule list esxcli storage core claimrule list
Change a path state (on or off) esxcfg-mpath -P [path name or UUID] -s [on or off] esxcli storage core path set -p [path name or UUID] --state=[active or off]
Rescan for VMFS vmkfstools -V vim-cmd hostsvc/storage/vmfs_rescan**
 
 
Note: Most of the vSphere 4 commands also work in vSphere 5. However, it is recommended to use the esxcli commands.

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 3 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
  • 3 Ratings
Actions
KB: