Cisco MDS SAN Zoning using CLI




Consider following examples:-

Switches = SW0 (Fabric – A), SW1 (Fabric – B)
Storage Initiator  =  SOBOSANCX4_SPA1
Storage PWWN = 50:06:01:62:39:a0:3d:64
Host HBA = CORALHOST_HBA0
Host PWWN = 21:00:00:1b:32:13:a8:9f
Active ZoneSet = SOBO_U2_SW0_Config
VSAN = 100

Do the following setups in Fabric – A (SW0)

1). Create device alias for Storage Initiator and Host HBA

SW0# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
SW0(config)# device-alias database
SW0(config-device-alias-db)#
 device-alias name SOBOSANCX4_SPA1 pwwn 50:06:01:62:39:a0:3d:64
 device-alias name CORALHOST_HBA0 pwwn 21:00:00:1b:32:13:a8:9f
SW0(config-device-alias-db)# exit
SW0(config)# show device-alias pending-diff
SW0(config)# device-alias commit 
SW0(config)# show device-alias session status
SW0(config)# end

To check the newly created device alias
SW0# show device-alias database  | inc ig SOBOSANCX4_SPA1
device-alias name SOBOSANCX4_SPA1 pwwn 50:06:01:62:39:a0:3d:64

SW0# show device-alias database  | inc ig CORALHOST_HBA0
device-alias name CORALHOST_HBA0 pwwn 21:00:00:1b:32:13:a8:9f

2). Create the Zone and Adding Members

SW0# configure terminal
SW0(config)# zone name SOBOSANCX4_SPA1_CORALHOST_HBA0 vsan 100
SW0(config)# member pwwn SOBOSANCX4_SPA1
SW0(config)# member pwwn CORALHOST_HBA0

To check the newly created Zone
SW0# show zone name SOBOSANCX4_SPA1_CORALHOST_HBA0 vsan 100

3). Find out the existing active zoneset, if it is already there. If it is not there, then you need to create a new one.

SW0# show zoneset active | inc zoneset
zoneset name SOBO_U2_SW0_CONFIG vsan 100

We got the active zoneset as ‘SOBO_U2_SW0_CONFIG’ with VSAN 100

4). Enter into the active zoneset ‘SOBO_U2_SW0_CONFIG’

SW0# configure terminal
SW0(config)# zoneset name SOBO_U2_SW0_CONFIG vsan 100

5). Add the newly created zone to active zoneset

SW0(config-zoneset)# member SOBOSANCX4_SPA1_CORALHOST_HBA0

6). Activate the active zoneset ‘SOBO_U2_SW0_CONFIG’

SW0(config-zoneset)# zoneset activate name SOBO_U2_SW0_CONFIG vsan 100
SW0(config-zoneset)# exit

7). Verify zone activation status

SW0# show zone status vsan 100

8). Ensure that the new zone is part of the active zoneset

SW0# show zone name SOBOSANCX4_SPA1_CORALHOST_HBA0 active vsan 100

If everything is fine, you can find the fcid along with * mark.

9). Copy the running config to the startup config

SW0# copy running-config startup-config

Do the corresponding configuration steps in Fabric - B (SW1) also. Then you all set.


No comments :