top of page

Esxcli Storage Commands



EsxCli Storage commands that help in daily operations

To see the Core adapter list that connected with host, use below esxcli command "[root@esxi02:~] esxcli storage core adapter list"

HBA Name Driver Link State UID Capabil ities Description -------- --------- ---------- -------------------------------------- ------- ------------ ------------------------------------------------------------------ ------ vmhba0 pvscsi link-n/a pscsi.vmhba0 (0000:03:00.0) VMware Inc. PVSCSI SCSI Controller vmhba1 vmkata link-n/a ide.vmhba1 (0000:00:07.1) Intel Corporation PIIX4 for 430TX/440BX/MX IDE Cont roller vmhba64 vmkata link-n/a ide.vmhba64 (0000:00:07.1) Intel Corporation PIIX4 for 430TX/440BX/MX IDE Cont roller vmhba65 iscsi_vmk online iqn.1998-01.com.vmware:esxi02-6a747db3 Second Level Lun ID iSCSI Software Adapter Datastores. Several commands allow you to manage datastores and are useful for multiple protocols.​ LUNs. Use esxcli storage core or vicfg-scsidevs commands to display available LUNs and mappings for each VMFS volume to its corresponding partition. See Examining LUNs. [root@esxi02:~] esxcli storage core path list ide.vmhba64-ide.0:0-mpx.vmhba64:C0:T0:L0 UID: ide.vmhba64-ide.0:0-mpx.vmhba64:C0:T0:L0 Runtime Name: vmhba64:C0:T0:L0 Device: mpx.vmhba64:C0:T0:L0 Device Display Name: Local NECVMWar CD-ROM (mpx.vmhba64:C0:T0:L0) Adapter: vmhba64 Channel: 0 Target: 0 LUN: 0 Plugin: NMP State: active Transport: ide Adapter Identifier: ide.vmhba64 Target Identifier: ide.0:0 Adapter Transport Details: Unavailable or path is unclaimed Target Transport Details: Unavailable or path is unclaimed Maximum IO Size: 32768 pscsi.vmhba0-pscsi.0:0-mpx.vmhba0:C0:T0:L0 UID: pscsi.vmhba0-pscsi.0:0-mpx.vmhba0:C0:T0:L0 Runtime Name: vmhba0:C0:T0:L0 Device: mpx.vmhba0:C0:T0:L0 Device Display Name: Local VMware, Disk (mpx.vmhba0:C0:T0:L0) Adapter: vmhba0 Channel: 0 Target: 0 LUN: 0 Plugin: NMP State: active Transport: parallel Adapter Identifier: pscsi.vmhba0 Target Identifier: pscsi.0:0 Adapter Transport Details: Unavailable or path is unclaimed Target Transport Details: Unavailable or path is unclaimed Maximum IO Size: 33553920 iqn.1998-01.com.vmware:esxi02-6a747db3-00023d000001,iqn.2006-01.com.openfiler:ts n.3c626d5f2d6f,t,1-t10.F405E46494C45425460374476646D2E4857324D2C4473533 UID: iqn.1998-01.com.vmware:esxi02-6a747db3-00023d000001,iqn.2006-01.com.open filer:tsn.3c626d5f2d6f,t,1-t10.F405E46494C45425460374476646D2E4857324D2C4473533 Runtime Name: vmhba65:C0:T2:L0 Device: t10.F405E46494C45425460374476646D2E4857324D2C4473533 Device Display Name: OPNFILER iSCSI Disk (t10.F405E46494C45425460374476646D2E 4857324D2C4473533) Adapter: vmhba65 Channel: 0 Target: 2 LUN: 0 Plugin: NMP State: active Transport: iscsi Adapter Identifier: iqn.1998-01.com.vmware:esxi02-6a747db3 Target Identifier: 00023d000001,iqn.2006-01.com.openfiler:tsn.3c626d5f2d6f,t, 1 Adapter Transport Details: iqn.1998-01.com.vmware:esxi02-6a747db3 Target Transport Details: IQN=iqn.2006-01.com.openfiler:tsn.3c626d5f2d6f Alia s= Session=00023d000001 PortalTag=1 Maximum IO Size: 131072 iqn.1998-01.com.vmware:esxi02-6a747db3-00023d000001,iqn.2006-01.com.openfiler:ts n.3c626d5f2d6f,t,1-t10.F405E46494C45425F42513273644D246138323D23365B425 UID: iqn.1998-01.com.vmware:esxi02-6a747db3-00023d000001,iqn.2006-01.com.open filer:tsn.3c626d5f2d6f,t,1-t10.F405E46494C45425F42513273644D246138323D23365B425 Runtime Name: vmhba65:C0:T2:L1 Device: t10.F405E46494C45425F42513273644D246138323D23365B425 Device Display Name: OPNFILER iSCSI Disk (t10.F405E46494C45425F42513273644D24 6138323D23365B425) Adapter: vmhba65 Channel: 0 Target: 2 LUN: 1 Plugin: NMP State: active Transport: iscsi Adapter Identifier: iqn.1998-01.com.vmware:esxi02-6a747db3 Target Identifier: 00023d000001,iqn.2006-01.com.openfiler:tsn.3c626d5f2d6f,t, 1 Adapter Transport Details: iqn.1998-01.com.vmware:esxi02-6a747db3 Target Transport Details: IQN=iqn.2006-01.com.openfiler:tsn.3c626d5f2d6f Alia s= Session=00023d000001 PortalTag=1 Maximum IO Size: 131072 If you have a storage in your environment and you wish to check the list of volumes that attached with vSphere environment, below is the esxcli command. [root@esxi02:~] esxcli storage filesystem list Mount Point Volume Name UUID Mounted Type Size Free ------------------------------------------------- ------------- -------------- --------------------- ------- ------ ------------ ------------ /vmfs/volumes/3370efdc-45e3c256 NFS-Datastore 3370efdc-45e3c 256 true NFS 11130200064 10968223744 /vmfs/volumes/5ea5d455-e2a670db-6028-000c2957a10c Local_131 5ea5d455-e2a67 0db-6028-000c2957a10c true VMFS-6 528817848320 527299510272 /vmfs/volumes/5eb83382-5df8d367-e58a-000c29e86c66 Gold 5eb83382-5df8d 367-e58a-000c29e86c66 true VMFS-6 73551314944 6967787520 /vmfs/volumes/6f562d74-77311826-8f37-ae525bc1a6e4 6f562d74-77311 826-8f37-ae525bc1a6e4 true vfat 261853184 97177600 /vmfs/volumes/5ea5d455-08c35095-b133-000c2957a10c 5ea5d455-08c35 095-b133-000c2957a10c true vfat 4293591040 4266983424 /vmfs/volumes/e9e9fa7e-7ccfca01-33f6-a6ed96adb4da e9e9fa7e-7ccfc a01-33f6-a6ed96adb4da true vfat 261853184 106213376 /vmfs/volumes/5ea5d44e-ce6a6169-40c7-000c2957a10c 5ea5d44e-ce6a6 169-40c7-000c2957a10c true vfat 299712512 117448704 ​​ Determine the LUN Size in the system. [root@esxi02:~] esxcfg-scsidevs -c Device UID Device Type Console Device Size Multipath PluginDisplay Name mpx.vmhba0:C0:T0:L0 Direct-Access /vmfs/devices/disks/mpx.vmhba0:C0:T0:L0 512000MB NMP Local VMware, Disk (mpx.vmhba0:C0:T0:L0) mpx.vmhba64:C0:T0:L0 CD-ROM /vmfs/devices/cdrom/mpx.vmhba64:C0:T0:L0 0MB NMP Local NECVMWar CD-ROM (mpx.vmhba64:C0:T0:L0) t10.F405E46494C45425460374476646D2E4857324D2C4473533 Direct-Access /vmfs/devices/disks/t10.F405E46494C45425460374476646D2E4857324D2C4473533 10880MB NMP OPNFILER iSCSI Disk (t10.F405E46494C45425460374476646D2E4857324D2C4473533) t10.F405E46494C454258434A4E63425D2550747F4D2573797D4 Direct-Access /vmfs/devices/disks/t10.F405E46494C454258434A4E63425D2550747F4D2573797D4 3744MB NMP OPNFILER iSCSI Disk (t10.F405E46494C454258434A4E63425D2550747F4D2573797D4) t10.F405E46494C45425F42513273644D246138323D23365B425 Direct-Access /vmfs/devices/disks/t10.F405E46494C45425F42513273644D246138323D23365B425 70240MB NMP OPNFILER iSCSI Disk (t10.F405E46494C45425F42513273644D246138323D23365B425) ​​ Identify raw device mapping (RDM) LUNs to be migrated. [root@esxi02:~] find /vmfs/volumes -name **-rdm** /vmfs/volumes/5eb83382-5df8d367-e58a-000c29e86c66/Windows_001/Windows_001_1-rdmp.vmdk /vmfs/volumes/5eb83382-5df8d367-e58a-000c29e86c66/Win_001/Win_001_2-rdmp.vmdk /vmfs/volumes/5eb83382-5df8d367-e58a-000c29e86c66/Win_001/Win_001_1-rdmp.vmdk Determine virtual machine configuration. [root@esxi02:~] esxcli storage filesystem list | grep VMFS /vmfs/volumes/5ea5d455-e2a670db-6028-000c2957a10c Local_131 5ea5d455-e2a670db-6028-000c2957a10c true VMFS-6 528817848320 527299510272 /vmfs/volumes/5eb83382-5df8d367-e58a-000c29e86c66 Gold 5eb83382-5df8d367-e58a-000c29e86c66 true VMFS-6 73551314944 6967787520 Obtain multipath settings for your storage in the vSphere Client:

  1. Select an ESX or ESXi host in the vSphere Client and click the Configuration tab.

  2. Click Storage.

  3. Select a datastore or mapped LUN.

  4. Click Properties.

  5. In the Properties dialog box, select the desired extent, if necessary.

  6. Click Extent Device > Manage Paths and obtain the paths in the Manage Path dialog box​ or

Obtain LUN multipathing information from the ESXi host command line:

  1. Log in to the ESXi host console.

  2. Run esxcli storage nmp device list to get multipath information

​[root@esxi02:~] esxcli storage nmp device list t10.F405E46494C45425F42513273644D246138323D23365B425 Device Display Name: OPNFILER iSCSI Disk (t10.F405E46494C45425F42513273644D246138323D23365B425) Storage Array Type: VMW_SATP_DEFAULT_AA Storage Array Type Device Config: {action_OnRetryErrors=off} Path Selection Policy: VMW_PSP_FIXED Path Selection Policy Device Config: {preferred=vmhba65:C0:T2:L1;current=vmhba65:C0:T2:L1} Path Selection Policy Device Custom Config: Working Paths: vmhba65:C0:T2:L1 Is USB: false t10.F405E46494C454258434A4E63425D2550747F4D2573797D4 Device Display Name: OPNFILER iSCSI Disk (t10.F405E46494C454258434A4E63425D2550747F4D2573797D4) Storage Array Type: VMW_SATP_DEFAULT_AA Storage Array Type Device Config: {action_OnRetryErrors=off} Path Selection Policy: VMW_PSP_FIXED Path Selection Policy Device Config: {preferred=vmhba65:C0:T2:L2;current=vmhba65:C0:T2:L2} Path Selection Policy Device Custom Config: Working Paths: vmhba65:C0:T2:L2 Is USB: false


79 views0 comments

Comments


Post: Blog2_Post
bottom of page