On 01/14/2014 01:56 AM, Nicholas A. Bellinger wrote:
Hi Craig,
On Mon, 2014-01-13 at 21:55 -0500, Craig Watson wrote:
Hi,
Well, I finally had a chance to set up a fibre channel target system
with kernel
3.12. Unfortunately, demo mode still doesn't appear to work for me. Here's
what I have:
Initiator Fedora 18
kernel 3.10.4-100
QLogic QLE2562 HBA
Target Fedora 20
kernel 3.12.6-300
QLogic QLE2462 HBA
targetcli 2.1.fb30-1
rtslib 2.1.fb40-1
configshell 1.1.fb9-1
I set things up as below:
-----------------------------------------------------------------------------
o- / ..................................................................
[...]
o- backstores .......................................................
[...]
| o- block ........................................... [Storage
Objects: 1]
| | o- strg .................. [/dev/md_d0 (238.5GiB) write-thru
activated]
| o- fileio .......................................... [Storage
Objects: 0]
| o- pscsi ........................................... [Storage
Objects: 0]
| o- ramdisk ......................................... [Storage
Objects: 0]
o- iscsi .....................................................
[Targets: 0]
o- loopback ..................................................
[Targets: 0]
o- qla2xxx ...................................................
[Targets: 2]
| o- naa.21000024XXXXXXXe ......................................
[gen-acls]
| | o- acls .....................................................
[ACLs: 0]
| | o- luns .....................................................
[LUNs: 1]
| | o- lun0 ................................... [block/strg
(/dev/md_d0)]
| o- naa.21000024XXXXXXXf ......................................
[gen-acls]
| o- acls .....................................................
[ACLs: 0]
| o- luns .....................................................
[LUNs: 1]
| o- lun0 ................................... [block/strg
(/dev/md_d0)]
o- vhost .....................................................
[Targets: 0]
-----------------------------------------------------------------------------
To enable demo mode I issued the following:
targetcli /qla2xxx/naa.21000024XXXXXXXe set attribute\
demo_mode_write_protect=0 generate_node_acls=1 cache_dynamic_acls=1\
demo_mode_login_only=0
This responded with:
Parameter demo_mode_login_only is now '0'.
Parameter demo_mode_write_protect is now '0'.
Parameter generate_node_acls is now '1'.
Parameter cache_dynamic_acls is now '1'.
Unfortunately, nothing I do enables the initiator to see the target machine.
Rebooting the initiator or issuing a link initialization and scan don't
help.
So, the issue your hitting is in the use of the global parameter
'auto_enable_tgpt' in targetcli.
By default when auto_enable_tgpt=true is set, and after creation of
a /qla2xxx/$FC_WWPN context in targetcli, target mode is enabled on the
FC port thus allowing FC initiators to login immediately using the
default hardcoded demo_mode_login_only=1 setting.
What happens is that a dynamic NodeACL with no MappedLUNs is created
within tcm_qla2xxx code for the FC initiator, and once
demo_mode_login_only=0 is changed after the fact, this dynamic ACL
remains unchanged because of cache_dynamic_acls=1 attribute usage.
So you've got two options here, either:
* After setting 'demo_mode_login_only=0' + configuring the rest of
$FC_WWPN, simply run 'saveconfig' and restart the target
A restart will cause demo_mode_login_only=0 to be set before target mode
is enabled during recreation of the configfs layout. Eg: No FC
initiators can login before enable occurs.
Or secondly, within targetcli use
* 'set global auto_enable_tpgt=false'
in order to prevent the automatic enabling of /qla2xxx/$FC_WWPN before
the attributes your currently using to enable demo mode have been
explicitly set. Of course, this will require an explicit 'enable' from
within /qla2xxx/$FC_WWPN context to enable target mode operation once
configuration is complete.
--nab
Hi Nicholas,
It's late here on the east coast but I had to put off sleep to try
this. Sure enough, it works!
We'll be going with the restart option since the target system is an
embedded device with
a somewhat fixed configuration. The users will have the option to use
the ACL WWPN
filtering but I haven't met one yet (in our niche market) that wants to
do that.
You have just made a lot of people very happy. You have no idea how
many people don't
like having to deal with ACLs on a private FC SAN. I didn't until we
sent a few of these out.
I've dealt with big system arrays that required setting up ACLs and
while it was a pain, I just
shrugged and dealt with it. When you run into entrenched organizations
that haven't had
to deal with it, their response is; "Well, if we have to do that out in
the field, we just won't buy
your product." They will go buy straight FC disk drives and avoid the
situation even though
they will take a performance and cost hit.
Now I have to try to get 3 hours sleep before I have to get up in the
morning.
Anyway, thanks for your prompt response and all the hard work you put
into this.
Sincerely,
Craig Watson
--
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