Dynamic connectivity overview in “switchshow” output

spreadsheet

In a Brocade environment the “switchshow” is one of the most used commands out there. It provides a quick overview of what the state of the switch is, switch name, switch attributes and a list of all ports and states. It had however its limitations which, with later codelevels, can be corrected.

As an example.

Sydney_ILAB_X6_43_TEST:FID43:admin> switchshow
switchName: Sydney_ILAB_X6_43_TEST
switchType: 165.0
switchState: Online
switchMode: Native
switchRole: Subordinate
switchDomain: 1
switchId: fffc01
switchWwn: 10:00:c4:f5:7c:66:ac:54
zoning: ON (ILAB_TEST)
switchBeacon: OFF
FC Router: OFF
Fabric Name: Generic Test Network
HIF Mode: OFF
Allow XISL Use: ON
LS Attributes: [FID: 43, Base Switch: No, Default Switch: No, Ficon Switch: No, Address Mode 0]

Index Slot Port Address Media Speed State Proto
============================================================
66 4 2 01ef40 id N8 Online FC F-Port 50:06:0e:80:10:13:b5:b8
67 4 3 01ef00 id N32 No_Light FC
68 4 4 01eec0 id N32 No_Light FC
69 4 5 01ee80 id N32 No_Light FC
70 4 6 01ee40 id N8 Online FC F-Port 50:06:0e:80:07:c3:70:00
72 4 8 010200 id N8 Online FC F-Port 1 N Port + 4 NPIV public

What is bit annoying is that you need to manually keep a list of WWN’s and it’s associated equipment i.e. what is connected where? That is a tedious piece of labour which is very error prone and, if not kept up-to-date, very dangerous. I’ve come across a fair few cases where SAN changes where executed based on information in spreadsheets that were plainly incorrect.

Portname

FOS has had the option to configure a name or other string to a port where you could specify whatever you wanted associated to that port. This help in management simplification so that a list of ports and it’s associated names can be set. You can argue that you can use the aliases in the zoning database for that but these do not show up in overviews other than zoning related.

portname <slot/port> -n “server1_hba2”

The issue is that this is also manual action and in in essence no better than a spreadsheet. The only benefit is that this can than be extracted by management software so that when you make a changed it is automatically picked up there. The management software can then be used to create reports or updated lists of this serving whatever purpose you like.

In FOS 7.4 the portname could be dynamically filled. For this you have to set the “Dynamic Portname Boolean no yes/no” setting to “yes” via the configure command. (Be aware this is only available when the switch is disabled.

Dynamics

As of FOS 8.1 the command “portname” has been extended so that the display of these fields can be adjusted. It can show the following:

S – Switchname
T – Port Type
I – Port Index
C – slot number/port number
A – Aliasname
F – FDMI hostname
R – Remote switchname

These can be set via the “-d” parameter with any of the above characters. To me the most useful are the FDMI hostname as well as the Alias name. The others are fairly superfluous as these are already displayed in the switchshow output.

portname -d “A.F”

That results in output like:

Sydney_ILAB_X6_43_TEST:FID43:admin> portname

port 84: VSPG700_UNI_Port_2F.
port 85: VSPG1500_EXT_Port_1D.
port 86: VSPG1500_TGT_Port_2A.
port 92: EVL_LIN_HBA0_P1.centos8
port 93: EVL_LIN_HBA0_P0.centos8

So in this case everything after the “.” is the FDMI hostname information and before the “.” is the alias name as configured with the “alicreate” command. Pretty cool hey.

It becomes even more useful when this is now combined with the switchshow output. As of FOS 8.1 the “switchshow” command can be appended with the “-portname” parameter. This then gives you the following:

85 4 21 20:55:c4:f5:7c:66:ac:54 VSPG1500_EXT_Port_1D.
86 4 22 20:56:c4:f5:7c:66:ac:54 VSPG1500_TGT_Port_2A.
92 4 28 20:5c:c4:f5:7c:66:ac:54 EVL_LIN_HBA0_P1.centos8
93 4 29 20:5d:c4:f5:7c:66:ac:54 EVL_LIN_HBA0_P0.centos8

As you can see this is now a very handy overview which doesn’t cost you any effort.

The dynamics come even more in play when thing change on a host side where you have no control over. Is a hostname changes this is propagated into FDMI which then results in the portname being dynamically populated with the new name.

Sydney_ILAB_X6_43_TEST:FID43:admin> switchshow -portname
switchName: Sydney_ILAB_X6_43_TEST
<snip>
92 4 28 20:5c:c4:f5:7c:66:ac:54 EVL_LIN_HBA0_P1.centos8
93 4 29 20:5d:c4:f5:7c:66:ac:54 EVL_LIN_HBA0_P0.centos8

New hostname:

[root@centos8 ~]# hostname linux12345

Sydney_ILAB_X6_43_TEST:FID43:admin> switchshow -portname
switchName: Sydney_ILAB_X6_43_TEST
92 4 28 20:5c:c4:f5:7c:66:ac:54 EVL_LIN_HBA0_P1.linux12345
93 4 29 20:5d:c4:f5:7c:66:ac:54 EVL_LIN_HBA0_P0.linux12345

!!! IMPORTANT !!!

The key is that the drivers and firmware of the respective HBA’s as well as the firmware/microcode of arrays are capable of doing this so that any change that is set it will automatically be propagated into fabrics.

Also the information that is propagated into the fabric by those devices depends on FDMI being enabled. On Emulex based HBA’s you can query if FDMI is enabled via the provided ocm tools or in sysfs under the /sys/class/scsi_host/<hostxx>/fdmi-on file

[root@linux12345 class]# hbacmd getdriverparamsglobal 10:00:00:90:fa:c7:cd:f9

Driver Params (Global) for 10:00:00:90:fa:c7:cd:f9. Values in HEX format.

DX                     string      Low     High     Glbl      Cur  Exp  Dyn
00:               log-verbose        0 ffffffff        0        0    d    1
01:           lun-queue-depth        1      200       1e        8    d    1
02:           tgt-queue-depth        a     ffff     ffff       20    d    1
03:                 scan-down        0        1        1        1 800d    2
04:               devloss-tmo        1       ff       1e        3    d    1
05:                  topology        0        6        0        0 8009    2
06:                link-speed        0       20        0        0 8009    2
07:                 fcp-class        2        3        3        3    d    2
08:                 use-adisc        0        1        0        0    d    1
09:                      ack0        0        1        0        0 a009    2
0a:                  cr-delay        0       3f        0        0 a009    2
0b:                  cr-count        1       ff        1        1 a009    2
0c:                                           fdmi-on        0        1        1        1    9    2
0d:                  max-luns        0     ffff       ff       ff    d    2
0e:               enable-npiv        0        1        1        1    d    2
0f:               enable-auth        0        1        0        0 900d    1
10:                   use-msi        0        2        2        2    d    2
[root@linux12345 host11]# cat /sys/class/scsi_host/host11/lpfc_fdmi_on
1

If it is not enabled you’ll need to set this via the module load option parameter and reload the driver.

[root@linux12345 class]# cat /etc/modprobe.d/elx-lpfc.conf

# Emulex lpfc options
options lpfc lpfc_fdmi_on=1

The Qlogic adapters have in effect the same settings  although the location and cli parameters differ. I’ll refer to the respective manuals on how to configure those.
When you install the windows drivers the management tool is normally included. If not these can be freely downloaded and you can adjust the appropraite settings in there. I have written a previous article explaining FDMI over here so you can see what it can do.

I hope this helps in somewhat easing the management of your fabrics a bit.

Regards,

Erwin

Print Friendly, PDF & Email

Subscribe to our newsletter to receive updates on products, services and general information around Linux, Storage and Cybersecurity.

The Cybersecurity option is an OPT-OUT selection due to the importance of the category. Modify your choice if needed.

Select list(s):