Re: qla2xxx_npiv support (in targetcli)

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

 



On 05/13/2015 12:48 AM, Tomasz Charoński wrote:
Dear Andy Grover, targetcli-fb Developers,

firstly, I'd like to thank you for your contribution in targetcli and
related libraries developing. I am writing to you to ask, if there it is
possible to add to targetcli qla2xxx_npiv support. I have been studying
this for 2 days now and it's hard to create NPIV targets manually.

Hi Tomasz!

I would hope we could add this and make it easier. I think some challenges will be I don't have hardware to develop on, at least not full-time, and also NPIV is a feature not represented in targetcli before now. Some thought on how best to present it will be needed, see below.

To create NPIV WWN using qla2xxx you need:
1. Create FC host using vport_create:

echo '1111222233334444:5555666677778888' >
/sys/class/fc_host/host5/vport_create

After this new /sys/class/fc_host/hostX will appear, but NPIV WWN is not
discovered at FC switch yet.

2. Create the path:
/sys/kernel/config/target/qla2xxx_npiv/21:00:00:xx:xx:xx:xx:11@5555666677778888:1111222233334444

where "21:00:00:xx:xx:xx:xx:11" is physical WWN taken from port_name
(sed needed).

Even though qla2xxx and qla2xxx_npiv are not represented hierarchically in configfs (they're peers) I'm wondering if that's not actually a mistake, and preferable to present differently in targetcli. It might be clearer to show it hierarchically -- create an "npivs" node:

qla2xxx
  o- 20:00:00:00:00:00:00:55
    o- acls
    o- luns
    o- npivs

in which "npivs/ create 5555666677778888 npiv_wwnn=1111222233334444"

would actually jump over to the qla2xxx_npiv configfs dir and set stuff up.

and then that would have its own "acls" and "luns" nodes too:

qla2xxx
  o- 20:00:00:00:00:00:00:55
    o- acls
    o- luns
    o- npivs
      o- 5555666677778888
        o- acls
        o- luns

**OR**

the phys wwpn node (e.g. "20:00..") could have a create_npiv command, e.g.:

00:55>/ create_npiv 5555666677778888 npiv_wwnn=1111222233334444"

leading to:

qla2xxx
  o- 20:00:00:00:00:00:00:55
    o- acls
    o- luns
qla2xxx_npiv
  o- 5555666677778888          [parent: 20:00:00:00:00:00:00:55]
    o- acls
    o- luns


my thoughts are to prefer the first way. It would be more work for the way tcm_qla2xxx implements NPIV but assuming LIO gets more FC fabrics in the future, I'm not sure we'd want them to do npiv like qla2xxx did.

3. qla2xxx_npiv directory seems to be the same as
/sys/kernel/config/target/qla2xxx. After enabling tgpt_1 I can see
"5555666677778888" at FC switch, however I can't successfuly share the
LUN with an initiator.

Have you created an ACL and lun mapping for that initiator? If that doesn't fix it then I don't know.

NPIV WWNs are needed to make user-friendly failover between hosts.

I am eager to help you in this development, especially including testing
this functionality in our infrastructure.

Great! :-)

Thanks -- Regards -- Andy

--
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