PowerPath command to count the number LUNS seen by the Linux host.

The following power path command will display all of the LUNS seen by the Linux host.

[root@dc02nbkp004 bin]# powermt display dev=all

The output looks like the following.

Pseudo name=emcpowera
Symmetrix ID=000192601978
Logical device ID=1E00
state=alive; policy=BasicFailover; queued-IOs=0
==============================================================================
————— Host —————   – Stor –  — I/O Path —   — Stats —
###  HW Path               I/O Paths    Interf.  Mode     State   Q-IOs Errors
==============================================================================
   2 qla2xxx                sdkj        FA  8eB  unlic    alive      0      0
   0 qla2xxx                sdcv        FA  9eA  active   alive      0      0
   2 qla2xxx                sdgp        FA  7hB  unlic    alive      0      0
   0 qla2xxx                sdb         FA 10hA  active   alive      0      1

Pseudo name=emcpoweraa
Symmetrix ID=000192601978
Logical device ID=07A4
state=alive; policy=BasicFailover; queued-IOs=0
==============================================================================
————— Host —————   – Stor –  — I/O Path —   — Stats —
###  HW Path               I/O Paths    Interf.  Mode     State   Q-IOs Errors
==============================================================================
   2 qla2xxx                sdlj        FA  8eB  unlic    alive      0      0
   2 qla2xxx                sdhp        FA  7hB  unlic    alive      0      0
   0 qla2xxx                sddv        FA  9eA  active   alive      0      0
   0 qla2xxx                sdab        FA 10hA  active   alive      0      1

To count the number of LUNS seen by the host I pick a unique string for each LUN and grep the output counting those lines that contain “Logical”. This gives the the number of LUNS seen by the host.

[root@dc02nbkp004 bin]# powermt display dev=all |grep Logical |wc -l
109
[root@dc02nbkp004 bin]#

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s