RE: Help with RTSLib

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

 



Hi Christopher,

On Thu, 2012-12-13 at 22:31 +0000, Holcombe, Christopher wrote:
> Hi Andy,
> 
> That's exactly what I did.  I played around with it for a while until stumbling on that solution.  Works great now!
> 

Just a heads up that you definitely want to avoid exporting individual
block device partitions with IBLOCK, as this is not supported by
target_core_iblock.ko.  You'll need to use FILEIO for individual
partition export.

Also, rtslib should be explicitly preventing this from happening.

What version / distro of rtslib is in use here..?

--nab 

> Thanks,
> Chris
> 
> -----Original Message-----
> From: target-devel-owner@xxxxxxxxxxxxxxx [mailto:target-devel-owner@xxxxxxxxxxxxxxx] On Behalf Of Andy Grover
> Sent: Thursday, December 13, 2012 2:49 PM
> To: Holcombe, Christopher
> Cc: target-devel@xxxxxxxxxxxxxxx
> Subject: Re: Help with RTSLib
> 
> On 12/13/2012 06:16 AM, Holcombe, Christopher wrote:
> >                 for a in acl_wwn:
> >                                 tpg = TPG(target, lun_id)
> >                                 map_lun = tpg.lun(lun_id, so, name)
> 
> > Depending on how I rework the code I get something like this:
> 
> >     tpg = TPG(target, lun_id)
> >   File "/usr/lib/python2.7/dist-packages/rtslib/target.py", line 999, in __init__
> >     raise RTSLibError("Target cannot have multiple TPGs.")
> > rtslib.utils.RTSLibError: Target cannot have multiple TPGs.
> 
> Try just creating one TPG object. For each StorageObject you will then need to add it to the tpg, creating a LUN object. Add a NodeACL to the TPG for each initiator, and for each NodeACL, create a MappedLUN to give the NodeACL access to the tpg LUN.
> 
> So it's a bit of a two-step process for fabrics that support ACLs. It makes more sense given that all fabrics don't support ACLs. For those, they just add the StorageObject to the TPG. But for fabrics that have initiator ACLs, they do that, and then also need to grant access to the TPG LUN by a given NodeACL with the MappedLUN.
> 
> so if you want to map a single storageobject to multiple initiators:
> 
> target = Target(fabric)
> tpg = TPG(target)
> lun = LUN(tpg, lun=0, so=so)
> 
> for init_wwn in initiator_wwns:
>     node_acl = NodeACL(tpg, init_wwn)
>     mlun = MappedLUN(node_acl, lun)
> 
> Hope this helps -- 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
> 
> ________________________________
> 
> NOTICE: This e-mail and any attachments is intended only for use by the addressee(s) named herein and may contain legally privileged, proprietary or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this email, and any attachments thereto, is strictly prohibited. If you receive this email in error please immediately notify me via reply email or at (800) 927-9800 and permanently delete the original copy and any copy of any e-mail, and any printout.
> --
> 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