Re: Qla2xxx initialization issue?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2012-02-23 at 09:15 -0700, Peter W. Morreale wrote:
> Hi all, 
> 

Hi Peter,

> I am playing with the LIO target stack for Fibre Channel with two
> openSUSE hosts as initiator and target.  (Yes, I am fully aware of the
> state of LIO wrt FC)
> 
> (Apologies for the legnth of this, however I have no hair left to pull
> out...)
> 
> I've been trying to follow the instructions in: 
> http://www.linux-iscsi.org/wiki/QLogic 
> substituting targetcli for rtsadmin.  
> 
> The modules on the target appear to be correctly loaded.  However I did
> notice that a tree of /sys/kernel/config/target does not match what the
> wiki page has for the configfs output.  In particular, I do not seem to
> have the "mapped_luns" output.  
> 

MappedLUNs are created for explict Initiator NodeACLs ($FABRIC/acls/),
and you'll need to configure these..  (see below)

> End result is the initiator is not initializing the qla2xxx module
> correctly, dmesg on that node says that the cables are unplugged.  They
> are plugged.  I do not see the lun on the initiator.  
> 
> Both nodes are opensuse 12.1, with the target having the lio kernel
> source as of Feb 15.  The initiator is a fully patched openSUSE 12.1. 
> 
> Both nodes have a QLogic QLE2462 - PCI-Express Dual Channel 4Gb Fibre
> Channel HBA card in them.  Both nodes have the qlogic's bios set to 4GB
> transfer rates.  I did not upgrade firmware on either node.
> 

You'll definitely want to upgrade the firmware on the target side to
5.06.x to avoid some known issues.

> What I did to create the config via targetcli was (essentially):
> 
> > cd /backstores/fileio
> > create lio /dev/sdb
> > cd /
> > cd tcm_fc
> > create
> > create /backstores/fileio/lio 0
> > exit
> 
> Here is a ls of the targetcli shell:
> 
> lisa:/sys/kernel/config # targetcli
> Welcome to the targetcli shell:
> 
> Copyright (c) 2011 by RisingTide Systems LLC.
> 
> Visit us at http://www.risingtidesystems.com.
> 
> Using loopback fabric module.
> Using tcm_fc fabric module.
> Can't load fabric module ib_srpt.
> Using qla2xxx fabric module.
> Using iscsi fabric module.
> /> ls
> o- / .......................................................................................................... [...]
>   o-
> backstores ............................................................................................... [...]
>   | o-
> fileio .................................................................................... [1 Storage Object]
>   | | o-
> lio ................................................................................... [/dev/sdb activated]
>   | o-
> iblock .................................................................................... [0 Storage Object]
>   | o-
> pscsi ..................................................................................... [0 Storage Object]
>   | o-
> rd_dr ..................................................................................... [0 Storage Object]
>   | o-
> rd_mcp .................................................................................... [0 Storage Object]
>   o-
> iscsi ............................................................................................... [0 Target]
>   o-
> loopback ............................................................................................ [0 Target]
>   o-
> qla2xxx ............................................................................................. [0 Target]
>   o-
> tcm_fc .............................................................................................. [1 Target]
>     o-
> 21:01:00:1b:32:29:48:df ............................................................................ [enabled]
>       o-

/tcm_fc is the libfc based FCoE (FC over Ethernet) software driver, and
is *not* what qla2xxx FC target code uses..

You need to configure WWPNs under /qla2xxx from within the shell, the
available qla2xxx target WWPN are shown via:

/> qla2xxx/ info 
Fabric module name: qla2xxx
ConfigFS path: /sys/kernel/config/target/qla2xxx
Allowed WWNs list (free type): 21:00:00:24:ff:31:4c:49,
21:00:00:24:ff:31:4c:48
Fabric module specfile: /var/target/fabric/qla2xxx.spec
Fabric module features: acls
Corresponding kernel module: tcm_qla2xxx

You'll need to create explict NodeACLs for FC Initiator WWPNs in order
for initiators to see WWPN LUNS.  So for example, in order for FC
Initiator 21:00:00:24:ff:31:4c:4d to access LUN=[0,1] on FC Target WWPN 
21:00:00:24:ff:31:4c:48, your configuration should look like:

/> ls qla2xxx/21:00:00:24:ff:31:4c:48/luns/
o- luns ............................................................... [2 LUNs]
  o- lun0 ........ [iblock/scsi_debug1 (/dev/disk/by-id/wwn-0x5001517959269ed1)]
  o- lun1 ............................................ [iblock/fioa (/dev/fioa)]
/> ls qla2xxx/21:00:00:24:ff:31:4c:48/acls/
o- acls ............................................................... [2 ACLs]
   o- 21:00:00:24:ff:31:4c:4d ................................... [2 Mapped LUNs]
    o- mapped_lun0 ................................................. [lun0 (rw)]
    o- mapped_lun1 ................................................. [lun1 (rw)]
/> 

The only part that's not TAB completable currently in the shell is
adding the FC Initiator WWPNs for the NodeACL, and these do need to be
formatted according to the filter in /var/target/fabric/qla2xxx.spec,
eg:

cat /sys/class/fc_host/host*/port_name | sed -e s/0x// -e 's/../&:/g' -e s/:$//

--nab

> acls ............................................................................................... [0 ACL]
>       o-
> luns ............................................................................................... [1 LUN]
>         o-
> lun0 ............................................................................. [fileio/lio (/dev/sdb)]
> /> 
> 
> And here is the 'tree' of /sys/kernel/config/target:
> 
> lisa:/sys/kernel/config # tree target
> target
> ├── core
> │   ├── alua
> │   │   └── lu_gps
> │   │       └── default_lu_gp
> │   │           ├── lu_gp_id
> │   │           └── members
> │   └── fileio_0
> │       ├── hba_info
> │       ├── hba_mode
> │       └── lio
> │           ├── alias
> │           ├── alua
> │           │   └── default_tg_pt_gp
> │           │       ├── alua_access_state
> │           │       ├── alua_access_status
> │           │       ├── alua_access_type
> │           │       ├── alua_write_metadata
> │           │       ├── members
> │           │       ├── nonop_delay_msecs
> │           │       ├── preferred
> │           │       ├── tg_pt_gp_id
> │           │       └── trans_delay_msecs
> │           ├── alua_lu_gp
> │           ├── attrib
> │           │   ├── block_size
> │           │   ├── emulate_dpo
> │           │   ├── emulate_fua_read
> │           │   ├── emulate_fua_write
> │           │   ├── emulate_rest_reord
> │           │   ├── emulate_tas
> │           │   ├── emulate_tpu
> │           │   ├── emulate_tpws
> │           │   ├── emulate_ua_intlck_ctrl
> │           │   ├── emulate_write_cache
> │           │   ├── enforce_pr_isids
> │           │   ├── fabric_max_sectors
> │           │   ├── hw_block_size
> │           │   ├── hw_max_sectors
> │           │   ├── hw_queue_depth
> │           │   ├── is_nonrot
> │           │   ├── max_sectors
> │           │   ├── max_unmap_block_desc_count
> │           │   ├── max_unmap_lba_count
> │           │   ├── optimal_sectors
> │           │   ├── queue_depth
> │           │   ├── unmap_granularity
> │           │   └── unmap_granularity_alignment
> │           ├── control
> │           ├── enable
> │           ├── info
> │           ├── pr
> │           │   ├── res_aptpl_active
> │           │   ├── res_aptpl_metadata
> │           │   ├── res_holder
> │           │   ├── res_pr_all_tgt_pts
> │           │   ├── res_pr_generation
> │           │   ├── res_pr_holder_tg_port
> │           │   ├── res_pr_registered_i_pts
> │           │   ├── res_pr_type
> │           │   └── res_type
> │           ├── statistics
> │           │   ├── scsi_dev
> │           │   │   ├── indx
> │           │   │   ├── inst
> │           │   │   ├── ports
> │           │   │   └── role
> │           │   ├── scsi_lu
> │           │   │   ├── creation_time
> │           │   │   ├── dev
> │           │   │   ├── dev_type
> │           │   │   ├── full_stat
> │           │   │   ├── hs_num_cmds
> │           │   │   ├── indx
> │           │   │   ├── inst
> │           │   │   ├── lun
> │           │   │   ├── lu_name
> │           │   │   ├── num_cmds
> │           │   │   ├── prod
> │           │   │   ├── read_mbytes
> │           │   │   ├── resets
> │           │   │   ├── rev
> │           │   │   ├── state_bit
> │           │   │   ├── status
> │           │   │   ├── vend
> │           │   │   └── write_mbytes
> │           │   └── scsi_tgt_dev
> │           │       ├── indx
> │           │       ├── inst
> │           │       ├── non_access_lus
> │           │       ├── num_lus
> │           │       ├── resets
> │           │       └── status
> │           ├── udev_path
> │           └── wwn
> │               ├── vpd_assoc_logical_unit
> │               ├── vpd_assoc_scsi_target_device
> │               ├── vpd_assoc_target_port
> │               ├── vpd_protocol_identifier
> │               └── vpd_unit_serial
> ├── fc
> │   ├── 21:01:00:1b:32:29:48:df
> │   │   ├── fabric_statistics
> │   │   └── tpgt_1
> │   │       ├── acls
> │   │       ├── attrib
> │   │       ├── lun
> │   │       │   └── lun_0
> │   │       │       ├── 15eefa76e2
> -> ../../../../../../target/core/fileio_0/lio
> │   │       │       ├── alua_tg_pt_gp
> │   │       │       ├── alua_tg_pt_offline
> │   │       │       ├── alua_tg_pt_status
> │   │       │       ├── alua_tg_pt_write_md
> │   │       │       └── statistics
> │   │       │           ├── scsi_port
> │   │       │           │   ├── busy_count
> │   │       │           │   ├── dev
> │   │       │           │   ├── indx
> │   │       │           │   ├── inst
> │   │       │           │   └── role
> │   │       │           ├── scsi_tgt_port
> │   │       │           │   ├── dev
> │   │       │           │   ├── hs_in_cmds
> │   │       │           │   ├── in_cmds
> │   │       │           │   ├── indx
> │   │       │           │   ├── inst
> │   │       │           │   ├── name
> │   │       │           │   ├── port_index
> │   │       │           │   ├── read_mbytes
> │   │       │           │   └── write_mbytes
> │   │       │           └── scsi_transport
> │   │       │               ├── device
> │   │       │               ├── dev_name
> │   │       │               ├── indx
> │   │       │               └── inst
> │   │       ├── np
> │   │       └── param
> │   ├── discovery_auth
> │   └── version
> ├── iscsi
> │   ├── discovery_auth
> │   │   ├── authenticate_target
> │   │   ├── enforce_discovery_auth
> │   │   ├── password
> │   │   ├── password_mutual
> │   │   ├── userid
> │   │   └── userid_mutual
> │   └── lio_version
> ├── loopback
> │   ├── discovery_auth
> │   └── version
> ├── qla2xxx
> │   ├── discovery_auth
> │   └── version
> └── version
> 
> 37 directories, 117 files
> 
> This does not match the wiki page for the qlogic configfs tree at all. 
> 
> What am I missing?
> 
> Thanks
> -PWM
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe target-devel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux