Small Fibre Channel Lab Experiences - Part 1

In order to understand some Fiber Channel basics, I'm working on building out a very small lab.  Currently this lab is a single MDS 9216A with a Xiotech disk shelf.  I added an Emulex LPE11000E HBA in one of my ESXi hosts.
The first thing I did when the MDS arrived was a password recovery.  Pretty simple process using the cntrl ] key sequence to boot into the boot prompt.  Then I changed the admin-password.

The next step was upgrading the SAN-OS to 3.3.  I wish it ran NX-OS but the command syntax is exactly the same from what I see.  I didn't have enough space in bootlfash: to keep two images but the 'install all' went fine and I did not need the existing version. I moved the MDS into my lab and cabled it up.  Then I added 3 disks into the disk shelf.

Port Types
I was interested in seeing the port types of the disk shelf and HBA:

This is the disk shelf - it's FL since it's an FC AL interface
MDS1# sh int fc1/1
fc1/1 is up
    Hardware is Fibre Channel, SFP is short wave laser w/o OFC (SN)
    Port WWN is 20:01:00:0d:ec:1f:bc:00
    Admin port mode is auto, trunk mode is on
    snmp link state traps are enabled
    Port mode is FL, FCID is 0xc90100
    Port vsan is 1

This is the HBA - it's F since it's a point-to-point fabric interface
MDS1# sh int fc1/4
fc1/4 is up
    Hardware is Fibre Channel, SFP is short wave laser w/o OFC (SN)
    Port WWN is 20:04:00:0d:ec:1f:bc:00
    Admin port mode is auto, trunk mode is on
    snmp link state traps are enabled
    Port mode is F, FCID is 0xc90000
    Port vsan is 1
 
Making sure that both the disks and the HBA logged in to the fabric correctly was my next step.


Fabric Logins

So we know that Node (N) ports should log into the fabric.  On an MDS, the command to view what devices have logged in is 'show flogi database'

MDS1# sh flogi database
---------------------------------------------------------------------------
INTERFACE  VSAN    FCID            PORT NAME               NODE NAME
---------------------------------------------------------------------------
fc1/1      1     0xc9014d  22:00:00:18:62:07:ff:e1  20:00:00:18:62:07:ff:e1
                           [DISK-300GB-1]
fc1/1      1     0xc9014e  22:00:00:11:c6:31:f7:bd  20:00:00:11:c6:31:f7:bd
                           [DISK-300GB-2]
fc1/1      1     0xc90151  22:00:00:11:c6:f5:1a:f2  20:00:00:11:c6:f5:1a:f2
                           [DISK-174GB-1]
fc1/4      1     0xc90000  10:00:00:00:c9:6e:b6:21  20:00:00:00:c9:6e:b6:21
                           [HELLA-HBA]

The first interesting piece of information here is the FCID.  A FCID is a 3 byte field used to route traffic through a fiber channel.  The first byte is the domain ID, the second the area ID and the last the port ID.

The port name is the PWWN and the node name is the WWN.


Device Aliases 

I created  device aliases to make identifying devices easier.  Pretty simple process - just grab the PWWN from the 'show flogi database' and create as below.

MDS1# sh device-alias database

device-alias name HELLA-HBA pwwn 10:00:00:00:c9:6e:b6:21
device-alias name DISK-174GB-1 pwwn 22:00:00:11:c6:f5:1a:f2
device-alias name DISK-300GB-1 pwwn 22:00:00:18:62:07:ff:e1
device-alias name DISK-300GB-2 pwwn 22:00:00:11:c6:31:f7:bd

Zoning

The next step involved checking the default zoning policy.  I found that I had to modify the default zone policy for VSAN 1 in order to go further.

MDS1# conf t
Enter configuration commands, one per line.  End with CNTL/Z.
MDS1(config)#zone default-zone permit vsan 1

MDS1# sh zone policy
Vsan: 1
   Default-zone: permit
   Distribute: active only
   Broadcast: disable
   Merge control: allow
   Generic Service: read-write

Discover the SCSI Targets

I found that in order to be able to see the disks in vSphere, I needed to 'discover' them in the MDS first.  This is the command I used:

MDS1# discover scsi-target local os all

The verifcation commands:

MDS1# sh scsi-target status
discovery completed

MDS1# sh scsi-target disk
--------------------------------------------------------------------------------
VSAN    FCID        PWWN                      VENDOR    MODEL             REV
--------------------------------------------------------------------------------
1       0xc9014d    22:00:00:18:62:07:ff:e1   SEAGATE   ST3300007FCE      FCA4
1       0xc9014e    22:00:00:11:c6:31:f7:bd   SEAGATE   ST3300007FCE      FC20
1       0xc90151    22:00:00:11:c6:f5:1a:f2   STON+WIR  ST3146707FC       7682

MDS1# sh scsi-target lun

ST3300007FCE from SEAGATE (Rev FCA4)
FCID is 0xc9014d in VSAN 1, PWWN is 22:00:00:18:62:07:ff:e1
--------------------------------------------------------------------------------
OS  LUN    Capacity Status  Serial Number    Device-Id
           (MB)
--------------------------------------------------------------------------------
WIN 0x0    300000   Online  3KR2N42000007704 C:1 A:0 T:3 20:00:00:18:62:07:ff:e1
AIX 0x0    300000   Online  3KR2N42000007704 C:1 A:0 T:3 20:00:00:18:62:07:ff:e1
SOL 0x0    300000   Online  3KR2N42000007704 C:1 A:0 T:3 20:00:00:18:62:07:ff:e1
LIN 0x0    300000   Online  3KR2N42000007704 C:1 A:0 T:3 20:00:00:18:62:07:ff:e1
HP  0x0    300000   Online  3KR2N42000007704 C:1 A:0 T:3 20:00:00:18:62:07:ff:e1
...

On to VMWare

The Vsphere portion was fairly simple.  Since the Emulex HBA I bought is on the VMWare HCL, there was no need to mess with any drivers.  A 'rescan all...' was all that was needed to have the disks show up.



Then I created LUN's (only for two of the three drives so far though).



Some Other Useful MDS 'Show' Commands
The fiber channel name server (FCNS) is useful to see which device is a initiator and which is a target. Also notice the 'N' and 'NL' port types on the MDS.  Loop on the disk side just like what was seen with the 'flogi' output.

 MDS1# sh fcns database vsan 1

VSAN 1:
--------------------------------------------------------------------------
FCID        TYPE  PWWN                    (VENDOR)        FC4-TYPE:FEATURE
--------------------------------------------------------------------------
0xc90000    N     10:00:00:00:c9:6e:b6:21 (Emulex)        scsi-fcp:init
                  [HELLA-HBA]
0xc9014d    NL    22:00:00:18:62:07:ff:e1                        scsi-fcp:target
                  [DISK-300GB-1]
0xc9014e    NL    22:00:00:11:c6:31:f7:bd                       scsi-fcp:target
                  [DISK-300GB-2]
0xc90151    NL    22:00:00:11:c6:f5:1a:f2                        scsi-fcp:target
                  [DISK-174GB-1]