[转]Solaris FCC related commands


There are always a bunch of strange commands to connect a server to SAN disks. In my case, I’m running Solaris 9, using QLogic Fibre Channel cards, and connecting to an IBM DS4300.

1) Connect the Solaris server SAN disks. After I made the connection, the GUI that allows me to zone the SAN recognized the QLogic connections, and I zoned the LUNs.

If you need more detailed instructions, here are some potentially useful posts: How to Zone a Brocade SAN Switch and How to Zone IBM DS4000 SAN Disks.

2) Scan your disks, and it should show up as a new disk when you run “format”.

Solaris# devfsadm
Solaris# format

My result: No new disks.  Sigh.

3) Run a bunch of cryptic but useful diagnostic commands:

To see your HBA ports and whether you’re connected:

Solaris# luxadm -e port
Found path to 3 HBA ports
/devices/pci@8,700000/SUNW,qlc@2/fp@0,0:devctl        CONNECTED
/devices/pci@8,700000/SUNW,qlc@2,1/fp@0,0:devctl     CONNECTED
/devices/pci@8,600000/SUNW,qlc@4/fp@0,0:devctl        CONNECTED

To see your disks:

Solaris# luxadm probe

To see your HBA ports (type fc-private, below) and their connected disks (type disk):

Solaris# cfgadm -al

Ap_Id                         Type           Receptacle  Occupant Condition
c8                               fc-private  connected configured unknown
c8::200800a0b8199b3b  disk           connected configured unknown
c9                               fc-private  connected configured unknown
c9::200900a0b8199b3b   disk          connected configured unknown

4) Force Fibre Channel SAN disk rescan, since everything looks connected and okay.  Use your device path from “luxadm -e port” output.

Solaris# luxadm -e forcelip /devices/pci@8,700000/SUNW,qlc@2/fp@0,0:devctl
Solaris# luxadm -e forcelip /devices/pci@8,700000/SUNW,qlc@2,1/fp@0,0:devctl
Solaris# luxadm -e forcelip /devices/pci@8,600000/SUNW,qlc@4/fp@0,0:devctl

5) Rerun format command.

Solaris # format

AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w500000e0107111e1,0
1. c1t1d0 t2
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w500000e01070d761,0
2. c7t600A0B801019B1B2002032A5489C60F3d0
/scsi_vhci/ssd@g600a0b801019b1b2002032a5489c60f3

Voila! There it is, disk #2.

 

 

Using fcinfo (Solaris 10 only)

This is probably the easiest way to find the WWN numbers on your HBA card. Here you can see the HBA Port WWN (WWpN) and the Node WWN (WWnN) of the two ports on the installed Qlogic HAB card.

This is also useful in finding the Model number, Firmwar version FCode, supported and current speeds and the port status of the HBA card/port.

 

root@ sunserver:/root# fcinfo hba-port | grep WWN
HBA Port WWN: 2100001b32xxxxxx
Node WWN: 2000001b32xxxxxx
HBA Port WWN: 2101001b32yyyyyy
Node WWN: 2001001b32yyyyyy

For detailed info including Make & model number, Firmware, Fcode and current status and supported/current speeds then

root@ sunserver:/root# fcinfo hba-port
HBA Port WWN: 2100001b32xxxxxx
OS Device Name: /dev/cfg/c2
Manufacturer: QLogic Corp.
Model: 375-3356-02
Firmware Version: 4.04.01
FCode/BIOS Version:  BIOS: 1.24; fcode: 1.24; EFI: 1.8;
Type: N-port
State: online
Supported Speeds: 1Gb 2Gb 4Gb
Current Speed: 4Gb
Node WWN: 2000001b32xxxxxx
HBA Port WWN: 2101001b32yyyyyy
OS Device Name: /dev/cfg/c3
Manufacturer: QLogic Corp.
Model: 375-3356-02
Firmware Version: 4.04.01
FCode/BIOS Version:  BIOS: 1.24; fcode: 1.24; EFI: 1.8;
Type: unknown
State: offline
Supported Speeds: 1Gb 2Gb 4Gb
Current Speed: not established
Node WWN: 2001001b32yyyyyy

 

Using scli

 

root@ sunserver:/root# scli -i | egrep “Node Name|Port Name”
Node Name                  : 20-00-00-1B-32-XX-XX-XX
Port Name                  : 21-00-00-1B-32-XX-XX-XX
Node Name                  : 20-01-00-1B-32-YY-YY-YY
Port Name                  : 21-01-00-1B-32-YY-YY-YY

 

For more detailed info on the HBA Cards run as follows: Similar to fcinfo but also provides Model Name and serial number.

 

root@ sunserver:/root# scli -i
——————————————————————————
Host Name                  : sunserver
HBA Model                  : QLE2462
HBA Alias                  :
Port                       : 1
Port Alias                 :
Node Name                  : 20-00-00-1B-32-XX-XX-XX
Port Name                  : 21-00-00-1B-32-XX-XX-XX
Port ID                    : 11-22-33
Serial Number              : AAAAAAA-bbbbbbbbbb
Driver Version             : qlc-20080514-2.28
FCode Version              : 1.24
Firmware Version           : 4.04.01
HBA Instance               : 2
OS Instance                : 2
HBA ID                     : 2-QLE2462
OptionROM BIOS Version     : 1.24
OptionROM FCode Version    : 1.24
OptionROM EFI Version      : 1.08
OptionROM Firmware Version : 4.00.26
Actual Connection Mode     : Point to Point
Actual Data Rate           : 2 Gbps
PortType (Topology)        : NPort
Total Number of Devices    : 2
HBA Status                 : Online
——————————————————————————
Host Name                  : sunserver
HBA Model                  : QLE2462
HBA Alias                  :
Port                       : 2
Port Alias                 :
Node Name                  : 20-01-00-1B-32-YY-YY-YY
Port Name                  : 21-01-00-1B-32-YY-YY-YY
Port ID                    : 00-00-00
Serial Number              : AAAAAAA-bbbbbbbbbb
Driver Version             : qlc-20080514-2.28
FCode Version              : 1.24
Firmware Version           : 4.04.01
HBA Instance               : 3
OS Instance                : 3
HBA ID                     : 3-QLE2462
OptionROM BIOS Version     : 1.24
OptionROM FCode Version    : 1.24
OptionROM EFI Version      : 1.08
OptionROM Firmware Version : 4.00.26
Actual Connection Mode     : Unknown
Actual Data Rate           : Unknown
PortType (Topology)        : Unidentified
Total Number of Devices    : 0
HBA Status                 : Loop down

 

Using prtconf

root@ sunserver:/root# prtconf -vp | grep -i wwn
port-wwn:  2100001b.32xxxxxx
node-wwn:  2000001b.32xxxxxx
port-wwn:  2101001b.32yyyyyy
node-wwn:  2001001b.32yyyyyy

Using prtpicl

root@ sunserver:/root# prtpicl -v | grep wwn
:node-wwn  20  00  00  1b  32  xx  xx  xx
:port-wwn  21  00  00  1b  32  xx  xx  xx
:node-wwn  20  01  00  1b  32  yy  yy  yy
:port-wwn  21  01  00  1b  32  yy  yy  yy

 

Using luxadm

Run the following command to obtain the physical path to the HBA Ports

root@ sunserver:/root$ luxadm -e port
/devices/pci@400/pci@0/pci@9/SUNW,qlc@0/fp@0,0:devctl              CONNECTED
/devices/pci@400/pci@0/pci@9/SUNW,qlc@0,1/fp@0,0:devctl            NOT CONNECTED

 

With the physical path obtained from the above command, we can trace the WWN numbers as follows. here I use the physical path to the one that is connected:

root@ sunserver:/root$ luxadm -e dump_map /devices/pci@400/pci@0/pci@9/SUNW,qlc@0/fp@0,0:devctl
Pos  Port_ID Hard_Addr Port WWN         Node WWN         Type
0    123456  0         1111111111111111 2222222222222222 0×0  (Disk device)
1    789123  0         1111111111111111 2222222222222222 0×0  (Disk device)
2    453789  0         2100001b32xxxxxx 2000001b32xxxxxx 0x1f (Unknown Type,Host Bus Adapter)

 

Hope this helps. If you know of any more way then please feel free to post it to the comments and I shall amend it to the article.

Advertisements
By Ctrl | Alt | Del Posted in Solaris Tagged

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s