2

I'm experimenting with FC with a view to setting up a SAN but appear to be stuck at the first hurdle - I can't seem to get targetcli to give me the option of using my qla2xxx card as a target. I've not used FC before, and am attempting to use RHEL guides to help me set up this embedded Gentoo distro. I've surely missed something somewhere, but where?! I've not set any custom USE flags to build targetcli / rtslib, just the regular portage ebuild.

Output from targetcli

gentoo-3 ~ # targetcli
targetcli GIT_VERSION (rtslib GIT_VERSION)
Copyright (c) 2011-2013 by Datera, Inc.
All rights reserved.
Loaded iscsi_target_mod kernel module.
Created '/sys/kernel/config/target/iscsi'.
/> ls
o- / .................................. [...]
  o- backstores ....................... [...]
  | o- fileio ............ [0 Storage Object]
  | 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 Targets]

Modules are loaded as expected

gentoo-3 ~ # lsmod | grep qla
qla2xxx               478604  0 
scsi_transport_fc      38566  1 qla2xxx

Initiator mode disabled on the hba using qla2xxx.qlini_mode=disabled kernel argument

gentoo-3 ~ # cat /sys/module/qla2xxx/parameters/qlini_mode
disabled

HBA WWN is correct

gentoo-3 ~ # cat /sys/class/fc_host/host4/port_name 
0x50014380029c208e

Driver version

gentoo-3 ~ # cat /sys/module/qla2xxx/version 
8.07.00.18-k

Kernel & system version

gentoo-3 ~ # uname -a
Linux gentoo-3 4.1.2 #4 SMP Tue Jul 21 10:49:33 BST 2015 x86_64 Intel(R) Core(TM) i5-3450S CPU @ 2.80GHz GenuineIntel GNU/Linux
2

Well, I found the answer eventually after a lot of poking about with the kernel configuration - I had not included the following configuration directive:

CONFIG_TCM_QLA2XXX=m

and as such, targetcli would not load this module and create the relevant structures in /sys/kernel/config. Of course I had everything else required, just not that!

Oh, the fun one can have with configuring a kernel from scratch.

  • This should be on ServerFault, isn't? Anyway... you're lucky for running Gentoo on this case. On RHEL/CentOS 7 the CONFIG_TCM_QLA2XXX=m options simply does not compile. The kernel module is just broken. – Vinícius Ferrão Jan 25 '17 at 6:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.