Hello Nab, * Nicholas A. Bellinger <nab@xxxxxxxxxxxxxxx> [2013-10-08 01:15]: > On Mon, 2013-10-07 at 23:20 +0200, Thomas Glanzmann wrote: > > Hello Nab, > > > > /backstores/fileio create shared-01.v101.campusvl.de /iscsi1/shared-01.v101.campusvl.de size=80G buffered=true > > > > /iscsi create iqn.2013-03.de.campusvl.v101.storage:shared-01.v101.campusvl.de > > > > /iscsi/iqn.2013-03.de.campusvl.v101.storage:shared-01.v101.campusvl.de/tpgt1/portals create 10.101.99.4 > > > > /iscsi/iqn.2013-03.de.campusvl.v101.storage:shared-01.v101.campusvl.de/tpgt1/portals create 10.101.99.5 > > > > /iscsi/iqn.2013-03.de.campusvl.v101.storage:shared-01.v101.campusvl.de/tpgt1/luns create /backstores/fileio/shared-01.v101.campusvl.de lun=10 > > > > /iscsi/iqn.2013-03.de.campusvl.v101.storage:shared-01.v101.campusvl.de/tpgt1/ set attribute authentication=0 demo_mode_write_protect=0 generate_node_acls=1 cache_dynamic_acls=1 > > > > /backstores/fileio create shared-01.v102.campusvl.de /iscsi1/shared-01.v102.campusvl.de size=80G buffered=true > > > > /iscsi create iqn.2013-03.de.campusvl.v102.storage:shared-01.v102.campusvl.de > > > > /iscsi/iqn.2013-03.de.campusvl.v102.storage:shared-01.v102.campusvl.de/ create 2 > > > > /iscsi/iqn.2013-03.de.campusvl.v102.storage:shared-01.v102.campusvl.de/tpgt2/portals create 10.102.99.4 > > > > /iscsi/iqn.2013-03.de.campusvl.v102.storage:shared-01.v102.campusvl.de/tpgt2/portals create 10.102.99.5 > > > > /iscsi/iqn.2013-03.de.campusvl.v102.storage:shared-01.v102.campusvl.de/tpgt2/luns create /backstores/fileio/shared-01.v102.campusvl.de lun=10 > > > > /iscsi/iqn.2013-03.de.campusvl.v102.storage:shared-01.v102.campusvl.de/tpgt2/ set attribute authentication=0 demo_mode_write_protect=0 generate_node_acls=1 cache_dynamic_acls=1 > > > > /iscsi/iqn.2013-03.de.campusvl.v102.storage:shared-01.v102.campusvl.de/ delete 1 > I'm guessing this has something to do with using the same TargetName > and multiple TargetPortalGroupTags. I thought that I use two different TargetNames. Am I wrong? > /iscsi create iqn.2013-03.de.campusvl.v101.storage:shared-01.v101.campusvl.de > /iscsi create iqn.2013-03.de.campusvl.v102.storage:shared-01.v102.campusvl.de > ~ ~ > The one limitation of doing this is that the Initiator does not > explicitly select which TargetPortalGroupTag it wants to connect with > during Login, and has to rely upon network portal addresses for this. > Can you confirm what logging into 10.101.99.4 returns for key > TargetPortalGroupTag in the first login response payload? > So separate from the above, I'd recommend using different TargetNames > w/ TPGT=1 across the different VLANs, and managing endpoints by > TargetNames instead of TargetPortalGroupTags. This should work the way > you expect with different VLANs. I though that I did this from the beginning. Just to confirm a Targetname is created by /iscsi create iqn.2013-03.de.campusvl.v101.storage:shared-01.v101.campusvl.de If that is the case than I always had different target names and TPGT was always 1 because it is the default and I did not change it. > Please confirm that > iqn.2013-03.de.campusvl.v102.storage:shared-01.v102.campusvl.de is > configured with generate_node_acls=0, and that no active sessions from > the initiator has created a NodeACL with se_node_acl->dynamic_node_acl Confirmed. In order to be sure I used the following Config (but I have also other private LUNs on the system demo_mode_discovery is disabled for them): set global auto_cd_after_create=false /backstores/fileio create shared-01.v101.campusvl.de /iscsi1/shared-01.v101.campusvl.de size=80G buffered=true /backstores/fileio create shared-02.v101.campusvl.de /iscsi2/shared-02.v101.campusvl.de size=80G buffered=true /iscsi create iqn.2013-03.de.campusvl.v101.storage:shared-01.v101.campusvl.de /iscsi/iqn.2013-03.de.campusvl.v101.storage:shared-01.v101.campusvl.de/tpgt1/portals create 10.101.99.4 /iscsi/iqn.2013-03.de.campusvl.v101.storage:shared-01.v101.campusvl.de/tpgt1/portals create 10.101.99.5 /iscsi/iqn.2013-03.de.campusvl.v101.storage:shared-01.v101.campusvl.de/tpgt1/luns create /backstores/fileio/shared-01.v101.campusvl.de lun=10 /iscsi/iqn.2013-03.de.campusvl.v101.storage:shared-01.v101.campusvl.de/tpgt1/ set attribute authentication=0 demo_mode_write_protect=0 generate_node_acls=1 cache_dynamic_acls=1 /iscsi create iqn.2013-03.de.campusvl.v101.storage:shared-02.v101.campusvl.de /iscsi/iqn.2013-03.de.campusvl.v101.storage:shared-02.v101.campusvl.de/tpgt1/portals create 10.101.99.4 /iscsi/iqn.2013-03.de.campusvl.v101.storage:shared-02.v101.campusvl.de/tpgt1/portals create 10.101.99.5 /iscsi/iqn.2013-03.de.campusvl.v101.storage:shared-02.v101.campusvl.de/tpgt1/luns create /backstores/fileio/shared-02.v101.campusvl.de lun=20 /iscsi/iqn.2013-03.de.campusvl.v101.storage:shared-02.v101.campusvl.de/tpgt1/ set attribute authentication=0 demo_mode_write_protect=0 generate_node_acls=1 cache_dynamic_acls=1 set global auto_cd_after_create=false /backstores/fileio create shared-01.v102.campusvl.de /iscsi1/shared-01.v102.campusvl.de size=80G buffered=true /backstores/fileio create shared-02.v102.campusvl.de /iscsi2/shared-02.v102.campusvl.de size=80G buffered=true /iscsi create iqn.2013-03.de.campusvl.v102.storage:shared-01.v102.campusvl.de /iscsi/iqn.2013-03.de.campusvl.v102.storage:shared-01.v102.campusvl.de/tpgt1/portals create 10.102.99.4 /iscsi/iqn.2013-03.de.campusvl.v102.storage:shared-01.v102.campusvl.de/tpgt1/portals create 10.102.99.5 /iscsi/iqn.2013-03.de.campusvl.v102.storage:shared-01.v102.campusvl.de/tpgt1/luns create /backstores/fileio/shared-01.v102.campusvl.de lun=10 /iscsi/iqn.2013-03.de.campusvl.v102.storage:shared-01.v102.campusvl.de/tpgt1/ set attribute authentication=0 demo_mode_write_protect=0 generate_node_acls=1 cache_dynamic_acls=1 /iscsi create iqn.2013-03.de.campusvl.v102.storage:shared-02.v102.campusvl.de /iscsi/iqn.2013-03.de.campusvl.v102.storage:shared-02.v102.campusvl.de/tpgt1/portals create 10.102.99.4 /iscsi/iqn.2013-03.de.campusvl.v102.storage:shared-02.v102.campusvl.de/tpgt1/portals create 10.102.99.5 /iscsi/iqn.2013-03.de.campusvl.v102.storage:shared-02.v102.campusvl.de/tpgt1/luns create /backstores/fileio/shared-02.v102.campusvl.de lun=20 /iscsi/iqn.2013-03.de.campusvl.v102.storage:shared-02.v102.campusvl.de/tpgt1/ set attribute authentication=0 demo_mode_write_protect=0 generate_node_acls=1 cache_dynamic_acls=1 I isntalled open-iscsi on Debian sid, changed the iqn to make sure that there are no cached node acls, than I did a discover and sniffed it. Here is the output: (miniwheezy64) [~] iscsiadm -m discovery -t sendtargets -p 10.101.99.4 10.101.99.4:3260,1 iqn.2013-03.de.campusvl.v101.storage:shared-01.v101.campusvl.de 10.101.99.5:3260,1 iqn.2013-03.de.campusvl.v101.storage:shared-01.v101.campusvl.de 10.101.99.4:3260,1 iqn.2013-03.de.campusvl.v101.storage:shared-02.v101.campusvl.de 10.101.99.5:3260,1 iqn.2013-03.de.campusvl.v101.storage:shared-02.v101.campusvl.de 10.102.99.4:3260,1 iqn.2013-03.de.campusvl.v102.storage:shared-01.v102.campusvl.de 10.102.99.5:3260,1 iqn.2013-03.de.campusvl.v102.storage:shared-01.v102.campusvl.de 10.102.99.4:3260,1 iqn.2013-03.de.campusvl.v102.storage:shared-02.v102.campusvl.de 10.102.99.5:3260,1 iqn.2013-03.de.campusvl.v102.storage:shared-02.v102.campusvl.de I also sniffed the same from the target. Please note that there are duplicated packets in the pcap because I did a '-i any' the system has bonding configured. So I see the packet once for the physical interface and the bond interface. https://thomas.glanzmann.de/tmp/discovery.pcap And I can confirm in the sniffer that I got the discovery: Opcode: Text Response (0x24) Flags: 0x80 1... .... = F: Final PDU in sequence .0.. .... = C: Text is complete TotalAHSLength: 0x00 DataSegmentLength: 0x00000234 LUN: 0000000000000000 InitiatorTaskTag: 0x00000001 TargetTransferTag: 0xffffffff StatSN: 0x9dee00da ExpCmdSN: 0x00000002 MaxCmdSN: 0x00000002 Key/Value Pairs KeyValue: TargetName=iqn.2013-03.de.campusvl.v101.storage:shared-01.v101.campusvl.de KeyValue: TargetAddress=10.101.99.4:3260,1 KeyValue: TargetAddress=10.101.99.5:3260,1 KeyValue: TargetName=iqn.2013-03.de.campusvl.v101.storage:shared-02.v101.campusvl.de KeyValue: TargetAddress=10.101.99.4:3260,1 KeyValue: TargetAddress=10.101.99.5:3260,1 KeyValue: TargetName=iqn.2013-03.de.campusvl.v102.storage:shared-01.v102.campusvl.de KeyValue: TargetAddress=10.102.99.4:3260,1 KeyValue: TargetAddress=10.102.99.5:3260,1 KeyValue: TargetName=iqn.2013-03.de.campusvl.v102.storage:shared-02.v102.campusvl.de KeyValue: TargetAddress=10.102.99.4:3260,1 KeyValue: TargetAddress=10.102.99.5:3260,1 Please let me know what the behaviour should be than I dig into the code and write a patch. It can't be hard to find. Cheers, Thomas -- 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