50mu – about storage

Brocade SAN Switch commands that prove to be very useful

Posted by Rob Koper on June 8, 2017 Leave a comment (0) Go to comments

Brocade commands are usually very easy to find out. Simply type “help” and look for the command you think you need, but what exactly does each command do? Here’s a list:

Info

uptime – Same as unix uptime
date – Same as unix date
version – Gives versions of firmwares & OS

Hardware State

faultshow – Show switch faults
fanshow – Show switch FAN faults
psshow – Show switch POWER SUPPLY faults
tempshow – Show switch TEMPERATURE values
switchstatusshow – Overall status of switch

Config

agtcfgshow – Show SNMP config
configshow – Show switch config
gbicshow – Show GBIC slots and serial numbers
licenseshow – Show license data
supportshow – Like Sun’s explorer – gets many configs at once
switchshow – Show switch ports and connections
zoneshow – Show zone and switch aliases

IP

bcastshow – Show broadcast routing
ifmodeshow – show interface mode (duplex)
ifshow – Like unix netstat -s
ipaddrshow – Like unix netstat -i
interfaceshow – Like unix ndd

Performance

ifshow – Like unix netstat -s
portperfshow – Show interface mode (duplex)
portshow # – Show stats on a port
portrouteshow # – Show routes on a port
portstatsshow # – Show stats (netstat -s) on a port

Misc Show

diagshow – Show diagnostics – paged output
errdump – Show diagnostics – no paged output
fabricshow – Show fabric
fspfshow – Show FSPF protocol info
mqshow – Show queues
nbrstateshow – Show FSPF neighbor states
nsshow – Show name servers
nsallshow – Show all name servers
porterrshow – Like mpstat – shows port info
switchstatuspolicyshow – Show config at when errors are flagged

Brocade Data Collection

There are 2 types of Data Collection associated with Brocade switches, “supportshow” and “supportsave”.

If the problem is related to basic “port issues”, a “supportshow” is sufficient. However, a more complex problem that involves Zoning, Performance, Reboots, CP Failovers, Fabric wide problems etc, requires a “SupportSave” type of collection. If the problem is multiswitch related (ISL connections, long distance configurations etc.) we need the supportsave from all relevant switches in the fabric.

The amount and type of information displayed in a supportshow output is depending on the type of switch as well as the collection options enabled in the switch configuration. This can be configured with the “supportshowcfgenable [option]” and “supportshowcfgdisable [option]”.

The output from the “supportshowcfgshow” command shows which subscripts will be enabled. The default groups are always enabled. Only on special occasions you will be asked to enable additional groups if necessary.

Performance and Intermittent Error Related Issues

If there is no sign of any obvious physical issue there might be link related problems which can identify performance problems and/or protocol related errors. Brocade counters are cumulative and keep doing so until a certain counter wraps, a switch reboots or the statistics are manually cleared.

Storage vendors for example require in these circumstances that a new baseline is created, a certain run-time has been achieved and separate commands are submitted against the suspected switch or switches.

To create a new baseline with cleared counters do the following:

  1. Log in to the switch via Telnet or SSH
  2. Submit the “statsclear” command
  3. Submit the “slotstatsclear” command

After the agreed (mostly around one hour) run-time capture a new supportsave and upload this to the vendor’s service request.

SupportSave Data Collection (CLI Method)

When the problem is more sophisticated a supportsave from the switch is required. The supportsave command is available as of Fabric OS version 4.4 however, Fabric OS versions (> 6.2.x) provide a significant better collection of logs which represent the status overview of the switch and fabric. If you have a director class switch with two CP’s and/or core plus function blades it will also collect information from all the blades.

The supportsave will upload between 25 and 80 files depending on platform, Fabric OS level and enabled features to an FTP or SCP server. These will not be tarred or zipped into one file so it is important you create such an archive with a meaningful name. (ie. switchname-domainid-fabricid.zip)

Example

Fabosv4.4switch:admin> supportsave -u anonymous -p password -h xxx.xxx.xxx.xxx -d /directory -l ftp

This command collects RASLOG, TRACE, supportShow, core file, FFDC data and then transfer them to a FTP/SCP server or a USB device. You could also simply type the “supportsave” command without any parameters and you will be asked for the extra information before the command is actually executed. The operation will usually take several minutes to complete.
NOTE: supportSave will transfer existing trace dump file first, then automatically generate and transfer latest one. There will be two trace dump files transferred after this command.

OK to proceed? (yes, y, no, n): [no] y
Saving support information for switch:BR4100_IP127, module:RAS…
Saving support information for switch:BR4100_IP127, module:CTRACE_OLD…
Saving support information for switch:BR4100_IP127, module:CTRACE_NEW…
etc……

To upload the files you can specify the FTP parameters inline (as modeled above) or through the supportftp command (see Fabric OS V5.1 command Reference guide) .

  1. Host IP: XXX.XXX.X.X (example 192.168.1.1)
  2. User Name: admin
  3. Password:
  4. Remote Directory: tmp (example: tmp)
  5. Saving support information

SupportShow Data Collection

This is a non disruptive procedure and can be performed by the CE or the customer.

You can use your favorite terminal emulation utility. Refer to the respective documentation how to turn on capturing output to a file.

Telnet or SSH

  1. Telnet or SSH into Brocade switch
  2. Enter username and password
  3. Start logging to file on the Telnet session.
    NOTE: For Windows standard telnet, this is under the terminal pulldown menu.
  4. Enter command: supportShow
  5. Upload the telnet log to TUF.

What is the Principal switch in a Brocade SAN

Principal switches maintain unique domain ID across the fabric. Principal switch ensures that each switch in a SAN have different domain ID. Any ISL of a switch that takes to the Principal switch is a upstream. Any ISL of a switch that goes away from principle switch is a downstream. All non principal switches are called subordinate switch. Zoning updated in a principal switch or a non principal switch will update zoning across the fabric. “date” command will be a read-only if a switch is configured with a Time server – NTP. Principal switch will update the time in all the non principal switches. tsclockserver is the command used to associate a switch to a NTP time server.

To manually set a subordinate switch to a principal switch use “fabricprincipal” command.

To elect a new principal switch:

>fabricprincipal -1 # This command will see the appropriate principal switch and make it as a new principal switch. Also, this will elect new upstream and downstream ISLs

To force a switch to be a principal switch:

> fabricprincipal -f # This command will force the switch to be the principal switch of the fabric. This will also elect new upstream and downstream ISLs

To see the current settings:

> fabricprincipal -q # This command will query the current settings and displays

How to check the Principle switch:

  1. Switchshow shows the principle

This Fabric has 2 switches

IBM_2109_M48_21:admin> switchshow

switchName: IBM_2109_M48_21
switchType: 42.2
switchState: Online
switchMode: Native
switchRole: Principal
switchDomain: 121
switchId: fffc79
switchWwn: 10:00:00:05:1e:36:0b:42
zoning: ON (Cfg_080123)
switchBeacon: ON
blade1 Beacon: OFF
blade2 Beacon: OFF
blade3 Beacon: OFF
blade4 Beacon: OFF
blade7 Beacon: OFF

DS_6505B:admin> switchshow
switchName: DS_6505B
switchType: 118.1
switchState: Online
switchMode: Native
switchRole: Subordinate
switchDomain: 130
switchId: fffc82
switchWwn: 10:00:00:05:33:cd:a4:c2
zoning: ON (Cfg_080123)
switchBeacon: OFF
FC Router: OFF
FC Router BB Fabric ID: 1
Address Mode: 0

How to Replace the Switch: