![]() | Oracle System Handbook - ISO 7.0 May 2018 Internal/Partner Edition | ||
|
|
![]() |
||||||||||||||||
Solution Type Technical Instruction Sure Solution 2108444.1 : How to Configure FC HBA NPIV With Vsan / Vhba on Guest LDom
In this Document
Created from <SR 3-12064894891> Applies to:SPARC T4-2 - Version All Versions and laterSolaris Operating System - Version 11.3 and later Information in this document applies to any platform. Goal Note: Unless source and destination devices support direct-connect NPIV, a NPIV capable FC Switch is usually required between the FC HBA and the storage device.
The objective of this document is to show how we can use NPIV feature on a control domain, in combination with new feature vsan / vhba, available on Solaris 11.3 or greater. vsan (primary or io domain) <<<——>>> vhba (guest)
About vhba and vsan , see this nice blog: Implementing vHBA Oracle® VM Server for SPARC 3.3 Release Notes Solaris 11.3 provides Oracle VM Server for SPARC 3.3 , documentation is available here: About NPIV , see this document as a example:
In this document : we will create and use a NPIV ports on a FC HBA to present different devices or LUNs on each WWN port: 1. Only a single tape device to a guest domain guest01, so the guest domain can do backup directly through the SAN, using vsan / vhba For a guest domain, there are several ways to do this: - create FC SR-IOV VFs and assign to the guest domain ,see: - assign virtual FC HBA as vsan (new in Solaris 11.3) to the guest domain, see also this doc:
2. A group of LUNs / Disk devices using different vsan Note. There is another approach to use NPIV with ldoms, see https://blogs.oracle.com/vmserver/entry/using_npiv_with_oracle_vm
Potentially relevant bug
SolutionSummary of actions performed : 1. On the service control domain there are two FC HBA Dual port , with two physical ports, so two WWNs. Note1. The guest domain will see only the LUNs mapped (disks or tapes) to the WWN of that particular NPIV port. Note2. With vsan/vhba the guest domain OS only see the LUNs present on the FC HBA, Solaris OS on guest domain does not see WWNs, or FC HBAs, or controllers (luxadm or cfgadm does not work) , Solaris just see the LUNs (disks with format, or tapes on /dev/rmt) mapped to the WWN of that FC HBA. Note3. Please, be aware that Solaris 11.3 SRU 7.6.0, integrates the following RFE: This means that *only for disk devices* , if you have Solaris 11.3 SRU 7.6.0 or greater Bug 24368313 - vHBAs not detecting tape drives on a guest LDOM If tape devices are not detected by guest LDom and mpxio is disabled on the service domain, you would need "ldm rescan-vhba" to force vhba to discover the devices.
Example 1) Initially , on the service control domain, we have mapped a tape device to the physical port WWN 2100000e1e2c9f10 (c8,qlc0) C# INST# PORT WWN MODEL FCODE STATUS DEVICE PATH c10 qlc2 21000024ff5afe11 7101674 (QLE8362) 4.02 CONNECTED /pci@3c0/pci@1/pci@0/pci@7/SUNW,qlc@0
root@cdom01:/# more cfgadm-al-o_show_FCP_dev.out c9 fc-private connected configured unknown c10 fc-fabric connected configured unknown c11 fc-private connected configured unknown
c8 = qlc0 (fp1) -> /devices/pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,0:devctl c10 = qlc2 (fp4) -> /devices/pci@3c0/pci@1/pci@0/pci@7/SUNW,qlc@0/fp@0,0:devctl
Jan 29 12:08:01 cdom01 qlc: [ID 628150 kern.info] NOTICE: Qlogic qlc(0,0,0): Link OFFLINE
Jan 29 12:08:01 cdom01 qlc: [ID 628150 kern.info] NOTICE: Qlogic qlc(0,0,0): Link ONLINE Jan 29 12:22:52 cdom01 scsi: [ID 583861 kern.info] sgen0 at fp1: unit-address w2002000e1110b93c,1: 20500 Jan 29 12:22:52 cdom01 genunix: [ID 936769 kern.info] sgen0 is /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,0/sgen@w2002000e1110b93c,1 Jan 29 12:22:52 cdom01 genunix: [ID 408114 kern.info] /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,0/sgen@w2002000e1110b93c,1 (sgen0) online Jan 29 12:22:52 cdom01 scsi: [ID 583861 kern.info] st0 at fp1: unit-address w2002000e1110b93c,0: 20500 Jan 29 12:22:52 cdom01 genunix: [ID 936769 kern.info] st0 is /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,0/st@w2002000e1110b93c,0 Jan 29 12:22:52 cdom01 scsi: [ID 365881 kern.info] /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,0/st@w2002000e1110b93c,0 (st0): Jan 29 12:22:52 cdom01 <HP Ultrium LTO 3> Jan 29 12:22:52 cdom01 genunix: [ID 408114 kern.info] /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,0/st@w2002000e1110b93c,0 (st0) online
2) There are no vsan on the primary domain for this FC HBA root@cdom01:~# ldm list-hba -l primary /SYS/MB/PCIE5/HBA0,1/PORT0,0 ....
3) Create the vsan: root@cdom01:~# ldm add-vsan /SYS/MB/PCIE5/HBA0/PORT0,0 pci5_port0 primary
/SYS/MB/PCIE5/HBA0/PORT0,0 resolved to device: /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,0 root@cdom01:~#
4) Check that there is a new vsan on the primary domain root@cdom01:~# ldm list-hba -l primary ....
5) Create the vhba root@cdom01:~# ldm add-vhba p0_vhba-pci5 pci5_port0 tapedisk
6) Set the timeout to 90 root@cdom01:~# ldm set-vhba timeout=90 p0_vhba-pci5 tapedisk
Note. We create another vsan on another FC HBA port, where we have some LUNs mapped from a disk storage array: ldm add-vsan /SYS/MB/PCIE8/HBA0/PORT0,0 pci8_port0 primary
7) The following commands show current configuration: root@cdom01:~# ldm list -o hba,san VSAN ------------------------------------------------------------------------------ VHBA
root@cdom01:~# ldm list-hba -d primary NAME VSAN /SYS/MB/PCIE8/HBA0/PORT0,0 pci8_port0
root@cdom01:/ldom/iso# ldm list-hba -t -d primary /SYS/MB/PCIE5/HBA0,1/PORT0,0 /SYS/MB/PCIE8/HBA0/PORT0,0 pci8_port0 /SYS/MB/PCIE8/HBA0,1/PORT0,0
root@cdom01:~# ldm list-domain -l ... VSAN ------------------------------------------------------------------------------ ... VHBA
Note. If we bind and start the guest domain tapedisk, from the OBP we can see the vhbas root@cdom01:/# ldm bind tapedisk Connecting to console "tapedisk" in group "tapedisk" .... {0} ok {0} ok devalias
8) Create two NPIV port, one each fc hba port root@cdom01:~# fcadm create-npiv-port -p c0007d6bef267821 -n c0007d6bef267820 2100000e1e2c9f10
root@cdom01:~# fcadm create-npiv-port -p c0007d6bef123456 -n c0007d6bef123455 2100000e1e2ca020
Check the new NPIV ports are present: root@cdom01:~# fcinfo hba-port .... HBA Port WWN: 2100000e1e2ca020
Expected messages when NPIV ports are created: Feb 8 21:34:14 cdom01 qlc: [ID 648178 kern.info] Qlogic qlc(0) NPIV(1) WWPN=c0007d6bef267821 : WWNN=c0007d6bef267820
Feb 8 21:34:15 cdom01 fcsm: [ID 517869 kern.info] NOTICE: fcsm(9): attached to path /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,1 Feb 8 21:34:15 cdom01 genunix: [ID 936769 kern.info] fp9 is /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,1 Feb 8 21:34:15 cdom01 genunix: [ID 408114 kern.info] /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,1 (fp9) online Feb 8 21:35:36 cdom01 qlc: [ID 648178 kern.info] Qlogic qlc(2) NPIV(1) WWPN=c0007d6bef123456 : WWNN=c0007d6bef123455 Feb 8 21:35:36 cdom01 fcsm: [ID 517869 kern.info] NOTICE: fcsm(10): attached to path /pci@3c0/pci@1/pci@0/pci@7/SUNW,qlc@0/fp@0,1 Feb 8 21:35:36 cdom01 genunix: [ID 936769 kern.info] fp10 is /pci@3c0/pci@1/pci@0/pci@7/SUNW,qlc@0/fp@0,1 Feb 8 21:35:36 cdom01 genunix: [ID 408114 kern.info] /pci@3c0/pci@1/pci@0/pci@7/SUNW,qlc@0/fp@0,1 (fp10) online
On the FC switch where c8 , qlc0 (fp1) is connected to portID 020100 we see the new NPIV port as another fc hba device 1 1 020100 id N16 Online FC F-Port 1 N Port + 1 NPIV public brocade6505-tvp540-a:admin> nsshow
Then make a new zone on the FC switch for the NPIV port WWN c0:00:7d:6b:ef:26:78:21 and a SE6140 storage and map two new LUNs When we run cfgenable on the FC switch (to make effective zonning changes) Feb 8 22:51:34 cdom01 scsi: [ID 583861 kern.info] ssd8 at fp9: unit-address w201600a0b811fbd4,1: 21300
Feb 8 22:51:34 cdom01 genunix: [ID 936769 kern.info] ssd8 is /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,1/ssd@w201600a0b811fbd4,1 Feb 8 22:51:34 cdom01 genunix: [ID 408114 kern.info] /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,1/ssd@w201600a0b811fbd4,1 (ssd8) online Feb 8 22:51:34 cdom01 scsi: [ID 583861 kern.info] ssd9 at fp9: unit-address w201600a0b811fbd4,0: 21300 Feb 8 22:51:34 cdom01 genunix: [ID 936769 kern.info] ssd9 is /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,1/ssd@w201600a0b811fbd4,0 Feb 8 22:51:34 cdom01 genunix: [ID 408114 kern.info] /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,1/ssd@w201600a0b811fbd4,0 (ssd9) online Feb 8 22:51:34 cdom01 scsi: [ID 583861 kern.info] ssd10 at fp9: unit-address w201700a0b811fbd4,1: 21200 Feb 8 22:51:34 cdom01 genunix: [ID 936769 kern.info] ssd10 is /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,1/ssd@w201700a0b811fbd4,1 Feb 8 22:51:36 cdom01 genunix: [ID 408114 kern.info] /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,1/ssd@w201700a0b811fbd4,1 (ssd10) online Feb 8 22:51:36 cdom01 scsi: [ID 583861 kern.info] ssd11 at fp9: unit-address w201700a0b811fbd4,0: 21200 Feb 8 22:51:36 cdom01 genunix: [ID 936769 kern.info] ssd11 is /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,1/ssd@w201700a0b811fbd4,0 Feb 8 22:51:37 cdom01 genunix: [ID 408114 kern.info] /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,1/ssd@w201700a0b811fbd4,0 (ssd11) online
11. c14t201600A0B811FBD4d0 <SUN-CSM200_R-0760-50.00GB> vol1
/pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,1/ssd@w201600a0b811fbd4,0 12. c14t201600A0B811FBD4d1 <SUN-CSM200_R-0760 cyl 510 alt 2 hd 64 sec 64> npiv_tes /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,1/ssd@w201600a0b811fbd4,1 13. c14t201700A0B811FBD4d0 <drive type unknown> /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,1/ssd@w201700a0b811fbd4,0 14. c14t201700A0B811FBD4d1 <drive type unknown> /pci@340/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,1/ssd@w201700a0b811fbd4,1 c14 fc-fabric connected configured unknown
c14::201600a0b811fbd4,0 disk connected configured unknown c14::201600a0b811fbd4,1 disk connected configured unknown c14::201700a0b811fbd4,0 disk connected configured unknown c14::201700a0b811fbd4,1 disk connected configured unknown The new NPIV port is seen as "/SYS/MB/PCIE5/HBA0/PORT0,1" root@cdom01:~# ldm list-hba -l primary /SYS/MB/PCIE5/HBA0/PORT0,1 <<<---- /SYS/MB/PCIE5/HBA0,1/PORT0,0
9) Then create the new vsan and vhba on top of that NPIV port ldm add-vsan /SYS/MB/PCIE5/HBA0/PORT0,1 pci5_port0_npiv1 primary
Checking new vsan and vhba are created: root@cdom01:~# ldm list -o hba VHBA
root@cdom01:~# ldm list-hba -l primary /SYS/MB/PCIE5/HBA0/PORT0,1 pci5_port0_npiv1 <<<--- New one /SYS/MB/PCIE5/HBA0,1/PORT0,0
Notice, when we run "ldm add-vhba p0npiv1_vhba-pci5 pci5_port0_npiv1 tapedisk" , on the guest domain the two LUNs Feb 8 22:59:52 guest01 cnex: [ID 799930 kern.info] channel-device: vhba4 Feb 8 23:00:04 guest01 scsi: [ID 583861 kern.info] sd4 at scsi_vhci0: unit-address g600a0b80002983fe00001c4f56b093ba: f_asym_lsi
Note. As a best practice, from the control domain you can save this LDom configuration with command "ldm add-spconfig my_new_config_name" , as explained on:
10) On the guest domain the disks can be seen with format : root@guest01:~# format AVAILABLE DISK SELECTIONS: 3. c0t600144F0B09928A066195510922D0001d0 <SUN-COMSTAR-1.0-9.77GB> 6. c1d0 <Unknown-Unknown-0001-39.06GB>
Note. Commands like luxadm , fcinfo, cfgadm will show nothing when only vsan / vhba are configured: root@guest01:~# luxadm -e port Only mpathadm command will show mpxio path information: root@guest01:~# mpathadm show LU Paths: Target Port Groups: Logical Unit: /dev/rdsk/c0t600144F0B09928A06619551092370002d0s2 Paths: Target Port Groups: Logical Unit: /dev/rdsk/c0t600144F0B09928A066195510923D0003d0s2 Paths: Target Port Groups: Logical Unit: /dev/rdsk/c0t600144F0B09928A066195510922D0001d0s2 Paths: Target Port Groups: Logical Unit: /dev/rdsk/c0t600A0B80002983FE00001C4F56B093BAd0s2 Paths: Initiator Port Name: 84f9efe200000005 Target Port Groups: ID: 6 Logical Unit: /dev/rdsk/c0t600A0B80002983FE00001C7356B1DAB5d0s2 Paths: Initiator Port Name: 84f9efe200000005 Target Port Groups: ID: 8
root@guest01:~# mpathadm show initiator-port 84f9efe200000005 root@guest01:~# mpathadm show initiator-port 84f9efe200000002
root@guest01:/dev/rmt# ls -l
total 24 lrwxrwxrwx 1 root root 94 Feb 4 16:09 0 -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0: lrwxrwxrwx 1 root root 95 Feb 4 16:09 0b -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:b lrwxrwxrwx 1 root root 96 Feb 4 16:09 0bn -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:bn lrwxrwxrwx 1 root root 95 Feb 4 16:09 0c -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:c lrwxrwxrwx 1 root root 96 Feb 4 16:09 0cb -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:cb lrwxrwxrwx 1 root root 97 Feb 4 16:09 0cbn -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:cbn lrwxrwxrwx 1 root root 96 Feb 4 16:09 0cn -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:cn lrwxrwxrwx 1 root root 95 Feb 4 16:09 0h -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:h lrwxrwxrwx 1 root root 96 Feb 4 16:09 0hb -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:hb lrwxrwxrwx 1 root root 97 Feb 4 16:09 0hbn -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:hbn lrwxrwxrwx 1 root root 96 Feb 4 16:09 0hn -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:hn lrwxrwxrwx 1 root root 95 Feb 4 16:09 0l -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:l lrwxrwxrwx 1 root root 96 Feb 4 16:09 0lb -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:lb lrwxrwxrwx 1 root root 97 Feb 4 16:09 0lbn -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:lbn lrwxrwxrwx 1 root root 96 Feb 4 16:09 0ln -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:ln lrwxrwxrwx 1 root root 95 Feb 4 16:09 0m -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:m lrwxrwxrwx 1 root root 96 Feb 4 16:09 0mb -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:mb lrwxrwxrwx 1 root root 97 Feb 4 16:09 0mbn -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:mbn lrwxrwxrwx 1 root root 96 Feb 4 16:09 0mn -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:mn lrwxrwxrwx 1 root root 95 Feb 4 16:09 0n -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:n lrwxrwxrwx 1 root root 95 Feb 4 16:09 0u -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:u lrwxrwxrwx 1 root root 96 Feb 4 16:09 0ub -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:ub lrwxrwxrwx 1 root root 97 Feb 4 16:09 0ubn -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:ubn lrwxrwxrwx 1 root root 96 Feb 4 16:09 0un -> ../../devices/virtual-devices@100/channel-devices@200/scsi@1/iport@0/tape@w2002000e1110b93c,0:un
root@guest01:/dev/rmt# mt status
HP Ultrium LTO 3 tape drive: sense key(0x0)= No Additional Sense residual= 0 retries= 0 file no= 0 block no= 0 root@guest01:/dev/rmt#
For additional troubleshooting: The following commands will show at kernel level what LUNs each of vhba and vsan know about: On guest domain: # echo "::vhba" | mdb -k On the service control domain: # echo "::vsan" | mdb -k
References<NOTE:1609077.1> - How to enable NPIV - Oracle Emulex FC HBA : fcinfo shows NPIV Not Supported<NOTE:1999091.1> - How to Create and Assign FC SR-IOV Virtual Functions (VFs) on an Emulex FC HBA <BUG:20951004> - VHBA SHOULD SUPPORT HBAS WHEN MPXIO IS ENABLED IN SERVICE DOMAIN <NOTE:2093753.1> - LUNs Not Recognized on a Guest LDOM Using vHBAs. <BUG:24368313> - VHBAS NOT DETECTING TAPE DRIVES ON A GUEST LDOM Attachments This solution has no attachment |
||||||||||||||||
|