Brocade SAN Switch Commands: Essential CLI for Storage Admins - 夜莺博客

Brocade SAN Switch Commands: Essential CLI for Storage Admins

Every Fibre Channel SAN admin eventually lives in the Brocade Fabric OS CLI — it is where port health, fabric topology and optical signal quality are truly visible. This guide compiles the essential Brocade SAN switch commands by task: quick health and overview checks, port-level troubleshooting for host-LUN issues, and fabric/ISL management for multi-switch backbones. Each command comes with its real-world use case so you know exactly when to reach for it.

Fabric OS is a different animal from switch CLIs in the Ethernet world. There is no configuration mode, no commit step and no candidate configuration: commands take effect immediately, which makes the CLI fast to use and unforgiving to typo. The upside is that the operational commands are unusually rich — a single porterrshow tells you more about a storage path than most Ethernet equivalents manage in three separate tools.

1. Quick Health and Overview Checks

Start every shift, every incident and every change window with this list. Nine times out of ten, one of these commands answers the question before you have to escalate.

switchshow        - display status of all ports
fabricshow        - view overall fabric details
chassisshow       - show hardware components (PSU, fans, etc.)
uptime            - how long the switch has been up
version           - show firmware version
licenseshow       - see active licenses
switchstatusshow  - high-level health check
tempshow          - view temperature sensors
supportshow       - collect full tech support logs
errdump           - live error/event log dump
errshow           - summary of switch error messages

Two of these deserve special attention. switchshow is the single most useful command in Fabric OS: it reports every port's state (Online, No_Light, No_Sync, In_Sync, Offline, Testing, Faulty, Disabled) together with its speed, WWPN and the nodename of whatever is logged in behind it. A route through the fabric starts as a scan of that column. And supportshow is the artefact your vendor will ask for first — know how to capture it to a file, because it is long:

switch:admin> supportshow > /tmp/supportshow.txt
switch:admin> supportsave

supportsave does the same job more thoroughly, collecting logs, core files and configuration into a transferable archive that can be sent off-box with supportftp. When you open a case, having a supportsave ready commonly saves a full round-trip with support.

2. Port-Level Troubleshooting

Essential for host-LUN issues, performance flapping, and cabling or SFP faults:

portshow <port#>        - view port status and config
porterrshow             - CRCs, sync losses, signal issues
portlogdump <port#>     - port link status history
portstatsshow           - port statistics (traffic, errors)
portdisable <port#>     - admin down
portenable <port#>      - admin up
portcfgshow <port#>     - port config settings
portcfgspeed <port#>    - set fixed speed (8/16/32G)
sfpshow <port#>         - SFP info (model, power, health)
portbuffershow          - buffer credits (for distance issues)

High porterrshow CRC counts usually mean bad cabling or a failing SFP — check sfpshow for optical power levels before replacing parts.

The columns of porterrshow are worth memorising, because the pattern of errors points at the layer that is at fault:

frames   tx      rx      enc_in  enc_out  disc_c3  link_fail  sync_loss  sig_loss  c3_timeout
1.2G     4.1G    3.9G    0       0        0         2          0          0         0
  • enc_in / enc_out — encoding errors. Non-zero values with a healthy link usually mean a marginal optic or a dirty connector.
  • crc — frame corruption. Almost always physical: patch lead, patch panel, or a failing SFP on either end.
  • link_fail / sync_loss / sig_loss — the link trained and then lost the carrier. Growing counts indicate an intermittent optical path or a speed mismatch.
  • disc_c3 — Class 3 discards. Non-zero here points at congestion or buffer exhaustion rather than a physical fault, and is where portbuffershow earns its place.
  • c3_timeout / c2_timeout — a frame was not delivered within the expected timeout, which is the signature of an over-subscribed or badly designed fabric.

A practical workflow for a suspected bad port: note the counters, clear them, wait a shift, then re-read. Counter clears make trends visible, and a rate of change is far more diagnostic than an absolute total accumulated over three years.

switch:admin> portstatsclear 12
switch:admin> porterrshow | grep " 12:"

3. Fabric and ISL Management

islshow           - display ISL links
trunkshow         - show trunking groups
trunkportshow <port#> - check trunk port behavior

For diagnostics and FICON environments, additional Fabric OS commands include diagshow (diagnostic status), ficonshow (FICON management database), and the portlog family (portlogenable, portlogdump) for link event history.

On a two-switch fabric, islshow and trunkshow are enough to confirm redundancy. On a larger core-edge design, read them together with fabricshow to confirm that every ISL you believe exists is actually online, and that the principal switch election produced the switch you expected. Trunking (ISL aggregation) is the usual fix for an over-subscribed inter-switch link, and trunkportshow tells you whether a port is genuinely a member of the trunk rather than sitting outside it and quietly carrying nothing.

4. Zoning Commands: The Other Half of the Job

Most "the host cannot see the LUN" tickets end in zoning, not in signalling. The zoning workflow is always the same four moves — create aliases, create zones from aliases, add zones to a configuration, then enable the configuration:

switch:admin> alicreate "host01_hba0", "20:00:00:25:b5:11:00:0a"
switch:admin> alicreate "array01_ctlrA", "50:00:09:73:00:12:34:56"
switch:admin> zonecreate "zone_host01_array01", "host01_hba0; array01_ctlrA"
switch:admin> cfgcreate "PROD_CFG", "zone_host01_array01"
switch:admin> cfgadd "PROD_CFG", "zone_new_host"
switch:admin> cfgsave
switch:admin> cfgenable "PROD_CFG"
switch:admin> zoneshow "zone_host01_array01"
switch:admin> cfgshow

Note that cfgcreate and cfgadd modify the defined configuration; cfgsave writes it to flash and cfgenable makes it the effective configuration and disrupts traffic where zoning actually changes. Skipping cfgsave is the classic way to lose a zoning change at the next reboot. The full walkthrough, including alias naming conventions and multi-fabric practice, is in the Brocade FC zoning with CLI guide.

5. Configuration Backup and Administration

A Brocade switch without a configuration backup is one firmware bug away from a rebuild. Two commands cover it:

switch:admin> configupload
switch:admin> configdownload
switch:admin> switchcfgshow
switch:admin> ipaddrshow
switch:admin> hashow
switch:admin> firmwareshow
switch:admin> licenseport --show

configupload prompts for a host, user, path and the configuration components to capture — zone configuration, switch configuration, or both. Take both. Capture it before every firmware upgrade and after every zoning change, and store it somewhere that is not the switch. On highly available directors, hashow tells you which CP is active and whether failover state is healthy; that single output often explains a "switch is behaving strangely" report faster than anything else.

6. Performance and Baseline Checks

Two more commands deserve a permanent place in the toolkit. portperfshow gives a live throughput view across all ports, which is the fastest way to spot a single over-loaded path:

switch:admin> portperfshow
switch:admin> portperfshow 5          # 5-second refresh
switch:admin> portstatsshow 12
switch:admin> fabricstatsshow

Read portperfshow during a reported slow-backup window and compare the busy ports against the zoning you configured: if the traffic is on a path you did not expect, the multipath driver on the host — not the fabric — is the thing to fix. Host-side path selection is covered in the Linux multipath.conf configuration guide.

7. Port States Decoded

switchshow becomes far more useful once you can read its state column without a lookup table. The states you will meet most often, and what each one actually means:

  • No_Light — no optical signal at the port. Cable, patch panel, or a dead SFP on either end. Swap the patch lead first: it is the cheapest test and the most common cause.
  • No_Sync — light is present but the link has not trained at a common speed. Usually a speed mismatch or a port that was never enabled.
  • In_Sync — the link trained but is not yet ready to carry traffic. It appears during initialisation and again after a zoning change re-enables ports.
  • Online — trained and forwarding, with a device login visible. This is the only state in which the port is doing its job.
  • Offline — the port was online and then lost the link. Frequently paired with growing link_fail counts in porterrshow.
  • Disabled — administratively down, either through portdisable or by the switch as a result of a licence or port-binding rule.
  • Faulty — the switch has marked the port itself unusable. On a blade system this usually points at the ASIC port rather than the optic.

Read the state together with the speed and the logged-in WWPN on the same line of output, and the diagnosis usually writes itself.

8. Firmware Upgrades Without Drama

Fabric OS upgrades are orderly but unforgiving of one mistake: doing both switches in a fabric at the same time. The standard sequence for a two-switch fabric is to verify ISL health with islshow, confirm the zoning configuration is non-disruptive with cfgshow, back up with configupload, upgrade the non-principal switch, confirm the fabric reformed with fabricshow, and only then upgrade the principal switch. Expect a brief disturbance for devices that have a single path even when the upgrade is described as non-disruptive, and stage the change so those devices are not in a critical backup window.

9. Diagnostics You Will Eventually Need

A handful of commands cover the rarer cases. fabricshow with its per-switch WWN and principal-switch flag settles any question about which switch was elected. fabricstatsshow aggregates counters fabric-wide, which helps when a problem spans switches but no single port shows obviously bad numbers. switchstatusshow compresses fan, power supply, temperature and port fault status into one screen — the fastest way to rule out a hardware cause before digging into signalling. And errdump is where the switch tells its own story: zoning rejections, login failures, SFP alarms and firmware events, in the order they happened.

Save these outputs on a schedule. A baseline captured while the fabric is healthy is worth ten times the same command run during an incident, because only a baseline tells you which number actually changed.

10. A Routine You Can Actually Follow

  • Daily: switchshow, porterrshow, fabricshow, errdump — five minutes, catches almost everything early.
  • Weekly: sfpshow on every active port, tempshow, switchstatusshow, portperfshow during peak load.
  • Before any change: configupload, note version, capture supportsave if the change touches firmware.
  • Quarterly: review ISL utilisation with trunkshow and portperfshow, audit zoning against the array and host inventories, and confirm optics ageing by comparing current Rx power with the values recorded at installation.

Optical power is worth its own habit: a receiving level that has drifted several dB from its commissioning value is the earliest warning you will get, well before CRCs appear. The thresholds and how to read them are explained in reading Rx/Tx dBm correctly.

Related SAN Content on This Site

Compare storage protocols in FC vs iSCSI vs NVMe-oF and the shorter FC vs iSCSI SAN comparison, manage arrays with Dell EMC Unity UEMCLI guide and HPE 3PAR controller replacement, and keep the array side tidy with the NetApp ONTAP CLI cheat sheet.

原文链接:https://medium.com/@madhuprasadcse/brocade-san-switch-commands-every-storage-admin-should-know-with-real-world-use-cases-4c91dedc4ea0