RCWRCW IT TrainingFree hands-on labs & simulators← Back to home
Storage · Troubleshooting guide

Fibre Channel: Zoning, Masking and the Missing LUN

A LUN reaches a host only when two independent doors agree: the fabric zone (which ports may talk) and the array masking (which host may see which LUN). "Missing LUN" incidents live in exactly one of the two — plus the host's own scan.

Published August 29, 2026 · RCW IT Training

Layer 1: does the HBA see the fabric at all?

cat /sys/class/fc_host/host*/port_state     # Online vs Linkdown
cat /sys/class/fc_host/host*/port_name      # the host WWPNs
cat /sys/class/fc_host/host*/supported_speeds
dmesg -T | grep -i -E 'fc |fibre|lpfc|qla' | tail

Linkdown is physical or SFP: cable, GBIC, or a disabled switch port. Online means login (FLOGI) succeeded and the problem is further up. After switch maintenance, a host that stayed Linkdown usually needs nothing more than the port re-enabled — but check the switch side for the port's error counters first.

Layer 2: zoning — who can talk to whom

On the switch, confirm the effective zone set actually contains your host WWPN ↔ target WWPN pair, not just the defined config (a zone edit that was never cfgenabled is the classic):

# Brocade-style:
zoneshow; cfgshow; nsshow        # effective config + name-server logins
# Cisco MDS-style:
show zone active; show flogi database

The name server is the truth of visibility: if the host's FLOGI is present but the target port WWPNs are absent from the host's view, zoning is the gap. Single-initiator zones make typos cheap to find — every missing pair is one zone member line.

Layer 3: masking — the array's own door

Zoned but still no LUN: the array's host group lacks the host WWPN, or the LUN is not mapped to that group. Symptoms differ subtly from zoning: with masking missing, the host sees the target ports (remote ports appear in /sys/class/fc_remote_ports) but zero LUNs from them; with zoning missing, the remote ports themselves never appear.

ls /sys/class/fc_remote_ports/          # target ports visible?
ls /sys/class/fc_transport/target*/     # and LUNs under them?

Compare the host's WWPN character-for-character with the array entry — a transposed nibble made during manual entry is a standing rite of passage. Copy WWPNs from port_name, never retype them.

Layer 4: the host must rescan

FC does not announce new LUNs to a running Linux host; you scan:

# rescan all hosts for new LUNs:
for h in /sys/class/scsi_host/host*; do echo "- - -" > $h/scan; done
# remove a stale device after unmapping:
echo 1 > /sys/block/sdX/device/delete

Skipping the delete step after an unmap leaves ghost devices that multipath treats as failed paths — clean both ends when storage moves.

Path loss after switch or array changes

  • Half the paths gone after a switch reboot: the other fabric's zone was touched, or the array port stayed disabled — check the array's port state, not just the host.
  • Host flapping between Online/Linkdown: dirty connectors or a marginal SFP; swap ends one at a time and watch fc_host statistics counters.
  • After an ISL change, verify zone merge did not drop your zone set (merge failures pick one config; the loser's zones vanish from the effective set).

NPV/NPIV: when the host WWPN is invisible on the switch

Blade and edge switches often run in NPV mode: host logins ride uplink FLOGIs, so the host WWPN does not appear as a switch port login where you expect it. Zone against the host WWPN regardless — but verify visibility in the NPV tables, not the port FLOGI list:

# Cisco MDS in NPV:
show npv flogi-table
# Brocade access gateway:
portloginshow / fcpinshow equivalents

A host absent from both the NPV table and the upstream core's name server is a host-side problem (HBA driver, cable, SFP), and chasing zoning for it wastes an hour. After blade reboots, NPIV logins can lag; give the fabric a minute before declaring the path dead.

The provisioning runbook, verbatim

  1. Copy host WWPNs from /sys/class/fc_host/host*/port_name into the change record.
  2. Add zone members on the fabric; enable the effective config; verify with cfgshow/show zone active.
  3. Add the WWPN to the array host group; map the LUN.
  4. Host: rescan, confirm remote ports and LUNs under /sys/class/fc_transport, then multipath map.
  5. Reverse order for removals, ending with device/delete so no ghost paths remain.

Every "missing LUN" postmortem in the industry reduces to a skipped step in this list.

Prevention checklist

  • Keep zoning and masking documents with copy-pasteable WWPNs; manual retyping is the top root cause.
  • After any fabric change, verify effective config, not defined config.
  • Script the host rescan+cleanup pair for provisioning so adds and removes stay symmetric.
  • Monitor fc_host port_state transitions; a flapping fabric path is a cable with a deadline.
Key takeaway: Work the chain: port_state Online → remote ports visible (zoning) → LUNs under them (masking) → host rescan done. Each layer's absence has a distinct signature in /sys, so the missing LUN stops being a mystery and becomes a checklist row.