A Storage Area Network or storage network consists of storage devices, switches and server hosts. Redundancy in a storage network is achieved through a technique called multipathing where you establish multiple physical connections between the storage and the host to avoid any single point of failure.
For a fully redundant SAN network, you need to have multiple HBAs (Host Bus Adapters) in the host server that are connected to two different Storage Processors (SP) via two switches.
The figure below shows a redundant multipath storage network with two servers. The servers have two HBA cards and are connected to two different FC switches for redundancy. The storage device has two Storage Processors and each SP has redundant connections to both FC switches.
FC Zoning(or just zoning) segregates and partitions a fibre channel fabric to control the access between the connected devices. Zoning defines which host HBAs have access to which SPs thereby isolating and reducing the paths between the host and the LUN.
The recommended configuration for implementing zoning in the fabric shown in Figure 1 is to create two zones in each switch. Each zone will have one host initiator and one LIF from each storage processor. This means you will have two zones in each switch as below.
Switch-1 Zone-1: HBA1, LIF1, LIF3 Switch-1 Zone-2: HBA3, LIF1, LIF3 Switch-2 Zone-1: HBA2, LIF2, LIF4 Switch-2 Zone-2: HBA4, LIF2, LIF4
Creating zones in a Brocade FC switch
Now that you are familiar with zoning, lets look at how to create zones on a Brocade FC switch.
1. Record WWPN
Members of a zone are identified by their World Wide Port Numbers(WWPN). So the first step is to get the WWPN of the HBA ports and LIFs.
You can get this information from switch by running the switchshow command.
FCSwitch1:admin> switchshow switchName: FCSwitch1 switchType: 71.2 switchState: Online switchMode: Native switchRole: Principal switchDomain: 1 switchId: fffc01 switchWwn: 10:00:40:ce:1b:32:f2:e1 zoning: ON (cfg_switch1_20200210) switchBeacon: OFF Index Port Address Media Speed State Proto ================================================== 0 0 010000 id N8 Online FC F-Port 21:00:00:24:ff:5f:a5:04 1 1 010100 id N8 Online FC F-Port 21:00:00:25:ff:5f:b5:06 2 2 010200 id N8 Online FC F-Port 1 N Port + 2 NPIV public 3 3 010300 id N8 Online FC F-Port 1 N Port + 2 NPIV public 4 4 010400 -- N8 No_Module FC (No POD License) Disabled 5 5 010500 -- N8 No_Module FC (No POD License) Disabled 6 6 010600 -- N8 No_Module FC (No POD License) Disabled 7 7 010700 -- N8 No_Module FC (No POD License) Disabled 8 8 010800 -- N8 No_Module FC (No POD License) Disabled 9 9 010900 -- N8 No_Module FC (No POD License) Disabled 10 10 010a00 -- N8 No_Module FC (No POD License) Disabled 11 11 010b00 -- N8 No_Module FC (No POD License) Disabled 12 12 010c00 -- N8 No_Module FC (No POD License) Disabled 13 13 010d00 -- N8 No_Module FC (No POD License) Disabled 14 14 010e00 -- N8 No_Module FC (No POD License) Disabled 15 15 010f00 -- N8 No_Module FC (No POD License) Disabled 16 16 011000 -- N8 No_Module FC (No POD License) Disabled 17 17 011100 -- N8 No_Module FC (No POD License) Disabled 18 18 011200 -- N8 No_Module FC (No POD License) Disabled 19 19 011300 -- N8 No_Module FC (No POD License) Disabled 20 20 011400 -- N8 No_Module FC (No POD License) Disabled 21 21 011500 -- N8 No_Module FC (No POD License) Disabled 22 22 011600 -- N8 No_Module FC (No POD License) Disabled 23 23 011700 -- N8 No_Module FC (No POD License) Disabled
In the above example you can see the WWPNs of the devices connected on ports 0 and 1. Ports 2 and 3 are online and shows "F-Port 1 N Port + 2 NPIV public" and does not show the WWPN. This means the device connected on these ports use NPIV (N-Port ID virtualization). NetApp ONTAP devices for example use NPIV. To get the WWPN of devices using NPIV, you can use the portshow command.
FCSwitch1:admin> portshow 2 portName: 02 portHealth: HEALTHY Authentication: None portDisableReason: None portCFlags: 0x1 portFlags: 0x24b03 PRESENT ACTIVE F_PORT G_PORT NPIV LOGICAL_ONLINE LOGIN NOELP LED ACCEPT portType: 10.0 portState: 1Online portPhys: 6In_Sync portScn: 32F_Port port generation number: 148 portId: 630200 portIfId: 43020005 portWwn: 20:02:00:05:1e:35:37:40 portWwn of device(s) connected: 50:00:65:ff:fb:00:16:fc 50:00:65:ff:fb:00:16:f8 This is a sample output
2. Check Config
The cfgshow command displays the currently effective switch configuration and lists the zones and aliases that are defined.
FCSwitch1:admin> cfgshow
3. Create Aliases
The next step is to create aliases for all members in the zone using the WWPNs recorded in step 2. You can create aliases using alicreate command as below.
FCSwitch1:admin> alicreate "HBA1", "21:00:00:24:ff:5f:a5:04" FCSwitch1:admin> alicreate "HBA3", "21:00:00:25:ff:5f:b5:06" FCSwitch1:admin> alicreate "LIF1", "50:00:65:ff:fb:00:16:f8" FCSwitch1:admin> alicreate "LIF3", "50:00:65:ff:fb:00:18:f6"
4. Create Zone
To create a zone, run the zonecreate command followed by a zone name and alias names separated by a semicolon.
FCSwitch1:admin> zonecreate "ZONE1", "HBA1;LIF1;LIF3" FCSwitch1:admin> zonecreate "ZONE2", "HBA3"
You can add an alias to an existing zone using the zoneadd command. For example, the following command adds the alias HBA1 to a zone named ZONE1
FCSwitch1:admin> zoneadd "ZONE2", "LIF1" FCSwitch1:admin> zoneadd "ZONE2", "LIF3"
5. Add zone to config
You can add zones to an existing config or a new config. To add a zone to a new config, run the cfgcreate command.
FCSwitch1:admin> cfgcreate "new_cfg", "ZONE1"
To add a zone to an existing config, run the cfgadd command.
FCSwitch1:admin> cfgadd "cfg_name", "ZONE2"
6. Save config
After all the zones are added, save the config using the cfgsave.
The cfgsave
command only saves the config and will not be enabled.
FCSwitch1:admin> cfgsave
7. Verify config
Run the cfgshow
command to verify aliases, zones and config are correctly created and listed under Defined configuration section.
FCSwitch1:admin> cfgshow Defined configuration: cfg: new_cfg ZONE1; ZONE2; zone: ZONE1 HBA1; LIF1; LIF3 zone: ZONE2 HBA3; LIF1; LIF3 alias: HBA1 21:00:00:24:ff:5f:a5:04 alias: HBA2 21:00:00:25:ff:5f:b5:06 alias: LIF1 50:00:65:ff:fb:00:16:f8 alias: LIF3 50:00:65:ff:fb:00:18:f6 Effective configuration:
8. Enable config
Finally to enable the config, run the command cfgenable followed by the config name.
FCSwitch1:admin> cfgenable new_cfg
Press Yes to confirm.
Run the cfgshow command to verify that the new config and zones are displayed under Effective configuration section.