Re: Specify controller tid in targets.conf

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

 



On Thu, 16 Jun 2011, frederik.vos@xxxxxxxxxx wrote:

> In our VMware environment, we're using the following configuration,  
> and it works (also with the vmware nmp multipathing method). It's  
> already possible to specify vendor and scsi_id (the scsi id will  
> become the T10 address), but you'll have to use the direct-store method
> 
> <target iqn.2004-01.nl.xtg:iscsi-server1>
>          direct-store /dev/sdb
>          initiator-address ALL
>          incominguser xxxx xxxx
>          scsi_id 00010001
>          vendor_id XTG
>          lun 12
> </target>
> 
I believe this may still result in several tgt servers running with the 
same scsi id and scsi sn.

What SCSI ID and SCSI SN do you get for LUN 0 of your targets for your 
different tgt servers? Run:

  tgtadm --lld iscsi --mode target --op show

I get

  LUN: 0
    Type: controller
    SCSI ID: IET     00010000
    SCSI SN: beaf10

for the first target of all tgt servers. With the same scsi id and
scsi sn on several tgt servers, VMware believes they are different paths 
to the same controller.

/Fredrik

> MaxRecvDataSegmentLength 131072
> MaxXmitDataSegmentLength 131072
> MaxBurstLength 262144
> FirstBurstLength 262144
> TargetRecvDataSegmentLength=262144
> InitiatorRecvDataSegmentLength=262144
> MaxOutstandingUnexpectedPDUs=0
> MaxOutstandingR2T=1
> MaxCommands=128
> 
> DataPDUInOrder=Yes
> DataSequenceInOrder=Yes
> 
> HeaderDigest=None
> DataDigest=None
> InitialR2T=No
> ImmediateData=Yes
> DelayedAck=Yes
> 
> ErrorRecoveryLevel=0
> IFMarker=No
> OFMarker=No
> DefaultTime2Wait=2
> DefaultTime2Retain=0
> OFMarkInt=Reject
> IFMarkInt=Reject
> MaxConnections=4
> RDMAExtensions=No
> 
> 
> Quoting Fredrik Ãslund <fredrik.aslund@xxxxxxxxxx>:
> 
> > Is there a way to specify the tid of a target controller in targets.conf?
> >
> > By default, tid 1 is used by tgt-admin. This means that all instances of
> > tgtd at different servers will have the same SCSI ID (and SCSI SN),
> > confusing iSCSI initiators (as VMware).
> >
> > This patch will allow targets.conf to include:
> > --
> > <target iqn.2011-06.com.example:storage1>
> >         backing-store /dev/system/iscsi_storage1
> >         scsi_id storage1_
> >         scsi_sn storage1_
> >
> >         controller_tid 11
> > </target>
> > --
> >
> > --- /usr/sbin/tgt-admin 2010-08-27 00:58:10.000000000 +0200
> > +++ tgt-admin   2011-06-15 16:50:28.000000000 +0200
> > @@ -283,6 +283,10 @@
> >                                                 $target_options_ref  
> > = \%target_options;
> >                                                 $data_key =  
> > make_key($target_options_ref, "lun", "allow-in-use");
> >                                         }
> > +
> > +                                       if (defined  
> > $target_options{"controller_tid"}) {
> > +                                               $next_tid =  
> > $target_options{"controller_tid"};
> > +                                       }
> >
> >                                         if (not defined  
> > $target_options{"driver"}) {
> >                                                  
> > $target_options{"driver"} = $default_driver;
> >
> > Is there a better way to accomplish this?
> >
> > /Fredrik
> >
> > Fredrik Ãslund
> > ----------------------------------
> > SystemadministratÃr
> > IT-stÃd och systemutveckling (ITS)
> > Umeà universitet
> > 901 87 UmeÃ
> > ----------------------------------
> > Telefon: +46 (0)90 786 65 43
> > Mobil:   +46 (0)70 303 78 36
> > ----------------------------------
> > fredrik.aslund@xxxxxxxxxx
> > www.its.umu.se
> 
> 
> 
> 

Fredrik Ãslund
----------------------------------
SystemadministratÃr
IT-stÃd och systemutveckling (ITS)
Umeà universitet
901 87 UmeÃ
----------------------------------
Telefon: +46 (0)90 786 65 43
Mobil:   +46 (0)70 303 78 36
----------------------------------
fredrik.aslund@xxxxxxxxxx
www.its.umu.se

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux