Step 1: Display HBA's
example:
bash-3.00# luxadm -e port
/devices/pci@1d,700000/SUNW,qlc@2,1/fp@0,0:devctl CONNECTED
/devices/pci@1d,700000/SUNW,qlc@2/fp@0,0:devctl CONNECTED
bash-3.00# luxadm -e port
/devices/pci@1d,700000/SUNW,qlc@2,1/fp@0,0:devctl CONNECTED
/devices/pci@1d,700000/SUNW,qlc@2/fp@0,0:devctl CONNECTED
In the above instance it is displaying 2 HBA's
Step 2: Get the WWN for HBA's
bash-3.00# fcinfo hba-port -l |grep HBA
HBA Port WWN: 21000024ff295a34
HBA Port WWN: 21000024ff295a35
HBA Port WWN: 21000024ff295a34
HBA Port WWN: 21000024ff295a35
Step 3:
i) Get LUNs Solaris OS already knows about
bash-3.00# fcinfo remote-port -sl -p 21000024ff295a34 > 21000024ff295a34.out
bash-3.00# fcinfo remote-port -sl -p 21000024ff295a35 > 21000024ff295a35.out
bash-3.00# cfgadm -al -o show_SCSI_LUN > currentLUNs.out
bash-3.00# fcinfo remote-port -sl -p 21000024ff295a35 > 21000024ff295a35.out
bash-3.00# cfgadm -al -o show_SCSI_LUN > currentLUNs.out
ii) To get additional information such as link statistics on HBA
bash-3.00# fcinfo hba-port -l 21000024ff295a35
HBA Port WWN: 21000024ff295a35
OS Device Name: /dev/cfg/c5
Manufacturer: QLogic Corp.
Model: 375-3356-02
Firmware Version: 05.03.02
FCode/BIOS Version: BIOS: 2.02; fcode: 2.01; EFI: 2.00;
Serial Number: 0402R00-1023835638
Driver Name: qlc
Driver Version: 20100301-3.00
Type: N-port
State: online
Supported Speeds: 1Gb 2Gb 4Gb
Current Speed: 4Gb
Node WWN: 20000024ff295a37
Link Error Statistics:
Link Failure Count: 0
Loss of Sync Count: 0
Loss of Signal Count: 0
Primitive Seq Protocol Error Count: 0
Invalid Tx Word Count: 0
Invalid CRC Count: 0
bash-3.00#
HBA Port WWN: 21000024ff295a35
OS Device Name: /dev/cfg/c5
Manufacturer: QLogic Corp.
Model: 375-3356-02
Firmware Version: 05.03.02
FCode/BIOS Version: BIOS: 2.02; fcode: 2.01; EFI: 2.00;
Serial Number: 0402R00-1023835638
Driver Name: qlc
Driver Version: 20100301-3.00
Type: N-port
State: online
Supported Speeds: 1Gb 2Gb 4Gb
Current Speed: 4Gb
Node WWN: 20000024ff295a37
Link Error Statistics:
Link Failure Count: 0
Loss of Sync Count: 0
Loss of Signal Count: 0
Primitive Seq Protocol Error Count: 0
Invalid Tx Word Count: 0
Invalid CRC Count: 0
bash-3.00#
Step 4: For each entry in /dev/fc, issue a "luxadm -e dump_map" command to view all the devices that are visible through that HBA port or for a specific HBA's
bash-3.00# luxadm -e port
/devices/pci@1d,700000/SUNW,qlc@2,1/fp@0,0:devctl CONNECTED
/devices/pci@1d,700000/SUNW,qlc@2/fp@0,0:devctl CONNECTED
bash-3.00# luxadm -e dump_map /devices/pci@1d,700000/SUNW,qlc@2,1/fp@0,0:devctl
bash-3.00# luxadm -e dump_map /devices/pci@1d,700000/SUNW,qlc@2/fp@0,0:devctl
/devices/pci@1d,700000/SUNW,qlc@2,1/fp@0,0:devctl CONNECTED
/devices/pci@1d,700000/SUNW,qlc@2/fp@0,0:devctl CONNECTED
bash-3.00# luxadm -e dump_map /devices/pci@1d,700000/SUNW,qlc@2,1/fp@0,0:devctl
bash-3.00# luxadm -e dump_map /devices/pci@1d,700000/SUNW,qlc@2/fp@0,0:devctl
Step 5: Let map a LUN from a storage system to solaris host and the scan
bash-3.00# devfsadm #This will scan for LUN but in solris 10 LUN should be populated automatically
bash-3.00# cfgadm -al #New LUNs show as unconfigured
Example:
c1::2200000c50401277 disk connected unconfigured unknown
bash-3.00# cfgadm -al #New LUNs show as unconfigured
Example:
c1::2200000c50401277 disk connected unconfigured unknown
Step 6: Configure the LUN using "cfgadm"
bash-3.00# cfgadm -c c1::2200000c50401277
bash-3.00# cfgadm -c configure c1 # We can also do it at controller level
bash-3.00# cfgadm -c configure c2
bash-3.00# cfgadm -c configure c1 # We can also do it at controller level
bash-3.00# cfgadm -c configure c2
Troubleshooting:
i) If LUNS are still not visible to solaris host
- Add a LUN id to /kernel/drv/sd.conf ( This is a text file ) using your comfortable editor
- Then "update_drv -f sd", Solaris 9 and 10 does not required this step
- Then scan for the LUN "devfsadm"
bash-3.00# vi /kernel/drv/sd.conf # Add LUN id
bash-3.00# update_drv -f sd"
bash-3.00# devfsadm
bash-3.00# update_drv -f sd"
bash-3.00# devfsadm
ii) If still not working then reboot the host
bash-3.00# reboot -r
Step 7: Get LUN info for Mounting by run the luxadm command
bash-3.00# luxadm probe
No Network Array enclosures found in /dev/es
Found Fibre Channel device(s):
Node WWN:200400a0b821eab1 Device Type:Disk device
Logical Path:/dev/rdsk/c6t600A0B800021E8B90000536B456B26B3d0s2
No Network Array enclosures found in /dev/es
Found Fibre Channel device(s):
Node WWN:200400a0b821eab1 Device Type:Disk device
Logical Path:/dev/rdsk/c6t600A0B800021E8B90000536B456B26B3d0s2
Step 8: Label disk using format command and select respective drive from luxadm output
Step 9 : Create New Filesystem on the LUN
bash-3.00# newfs /dev/rdsk/c6t600A0B800021E8B90000536B456B26B3d0s2
Step 10: Edit /etc/vfstab to auto mount the new LUN on reboot
bash-3.00# vi /etc/vfstab # The content below in the double quotes show be in one line
"/dev/dsk/c6t600A0B800021E8B90000536B456B26B3d0s2 /dev/rdsk/c6t600A0B800021E8B90000536B456B26B3d0s2 /tibco ufs 1 yes logging"
"/dev/dsk/c6t600A0B800021E8B90000536B456B26B3d0s2 /dev/rdsk/c6t600A0B800021E8B90000536B456B26B3d0s2 /tibco ufs 1 yes logging"
Step 11: You can manually mount it using following commands
bash-3.00# mount /tibco
Step 12: Verfing the mount point
bash-3.00# mount | grep tibco
/tibco on /dev/dsk/c6t600A0B800021E8B90000536B456B26B3d0s2 read/write/setuid/devices/intr/largefiles/logging/xattr/onerror=panic/dev=1d80022
/tibco on /dev/dsk/c6t600A0B800021E8B90000536B456B26B3d0s2 read/write/setuid/devices/intr/largefiles/logging/xattr/onerror=panic/dev=1d80022
Step 13: You are done ... Start writing files to the disk