Tuesday, 30 April 2013

How to find HBA WWN via ESXi Shell / CLI

with thanks to http://www.vstrong.info

How to find HBA WWN via ESXi Shell / CLI:
  • Connect to ESXi shell either via putty/SSH or DCUI (Direct Console User Interface) / server console
  • Run ‘ls /proc/scsi/‘ and check the folder names:
    ?
    1
    2
    ~ # ls /proc/scsi/
     mptsas   qla2xxx
  • Look for a folder like ‘qla2xxx‘ – QLogic HBA, ‘lpfc820‘ – Emulex HBA, ‘bnx2i” – Brocade HBA;
  • Run ‘ls /proc/scsi/qla2xxx’. You will get a list of files, named by a number. Each file contains information about one HBA;
    ?
    1
    2
    ~ # ls /proc/scsi/qla2xxx/
    6  7
  • Now run ‘cat /proc/scsi/qla2xxx/6‘ to get full info on the HBA. Alternatively, run the following commands:
    • Run ” cat /proc/scsi/qla2xxx/6 | grep -A3 ‘SCSI Device Information:’  ” to get WWNN and WWPNs:
      ?
      1
      2
      3
      4
      ~ # cat /proc/scsi/qla2xxx/6 | grep -A3 'SCSI Device Information:'
      SCSI Device Information:
      scsi-qla0-adapter-node=20000024ff31f0c8:000000:0;
      scsi-qla0-adapter-port=21000024ff31f0c8:000000:0;
    • Run “ cat /proc/scsi/qla2xxx/6 | grep ‘Host Device Name’ ” to get vmhba number:
      ?
      1
      2
      ~ # cat /proc/scsi/qla2xxx/6 | grep 'Host Device Name'
      Host Device Name vmhba3

No comments:

Post a Comment