[Ovirt-devel] [Patch] Make iscsi targets for the developer versions

mark wagner mwagner at redhat.com
Mon Mar 24 14:44:28 UTC 2008


A few comments inline

-mark

Chris Lalancette wrote:
> A few things about this patch:
>
> mark wagner wrote:
>   
>> Please review the attached patch. It should make some small iscsi targets for the developer versions 
>> of the wui.
>>
>> It is not anticipated that these devices will actually be used to hold any data so they are really 
>> small, although they are set to "grow" if there is a need for space.
>>
>> I also append the commands to the rc.local file in order to properly configure and share them on 
>> startup.  tgtadm does not use a config file so things are hardcoded for now.
>>
>> Note that these patches *should* be based on the release branch that Chris is working on.
>>     
>
> <snip>
>
>   
>>  %include common-lvm.ks
>>  
>> +# Create some fake iSCSI partitions
>> +logvol /iscsi1 --name=iSCSI1 --vgname=VolGroup00 --size=64 --grow
>> +logvol /iscsi2 --name=iSCSI2 --vgname=VolGroup00 --size=64 --grow
>> +logvol /iscsi3 --name=iSCSI3 --vgname=VolGroup00 --size=64 --grow
>> +
>>     
>
> The above stuff should go into "common-lvm.ks"; that way, you don't have to
> repeat this information for i386 and x86_64 kickstarts.
>   
I did not add them to the common-lvm.ks file because that would create 
the volumes on the non-developer version as well.   Didn't think that we 
wanted them there. I can change the location if that is what we want.
> <snip>
>
>   
>>  %include common-lvm.ks
>> +# Create some fake iSCSI partitions
>> +logvol /iscsi1 --name=iSCSI1 --vgname=VolGroup00 --size=64 --grow
>> +logvol /iscsi2 --name=iSCSI2 --vgname=VolGroup00 --size=64 --grow
>> +logvol /iscsi3 --name=iSCSI3 --vgname=VolGroup00 --size=64 --grow
>>     
>
> This goes with the above comment of common-lvm.ks
>
>   
See above
> <snip>
>
>   
>> +# Setup the iscsi stuff to be ready on each boot.  Since tgtadm does not use a config file
>> +# append what we need to the rc.local file.  Note that this for the developers version only. 
>> +
>> +cat >> /etc/rc.d/rc.local << \EOF
>> +#
>> +# Set up the fake iscsi targets
>> +tgtadm --lld iscsi --op new --mode target --tid 1 -T node3:disk1
>> +tgtadm --lld iscsi --op new --mode target --tid 1 -T node4:disk1
>> +tgtadm --lld iscsi --op new --mode target --tid 1 -T node5:disk1
>> +#
>> +# Now associate them to the LVs
>> +# 
>> +tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /dev/VolGroup00/iSCSI1
>> +tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 2 -b /dev/VolGroup00/iSCSI2
>> +tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 3 -b /dev/VolGroup00/iSCSI3
>> +# 
>> +# Now make them available
>> +#
>>     
>
> My understanding of the iscsi target is admittedly weak, but I'm not sure this
> is what you want to do.  As I understand it, this will actually only create one
>  target (node5:disk1), with 3 LUN's, because you are overriding the tid in the
> top 3 lines.  I think what you probably want is one target per host, and then
> one LUN per target, so your commands would look something like:
>
> tgtadm --lld iscsi --op new --mode target --tid 1 -T node3:disk1
> tgtadm --lld iscsi --op new --mode target --tid 2 -T node4:disk1
> tgtadm --lld iscsi --op new --mode target --tid 3 -T node5:disk1
>
> tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b
> /dev/VolGroup00/iSCSI1
> tgtadm --lld iscsi --op new --mode logicalunit --tid 2 --lun 1 -b
> /dev/VolGroup00/iSCSI2
> tgtadm --lld iscsi --op new --mode logicalunit --tid 3 --lun 1 -b
> /dev/VolGroup00/iSCSI3
>
> That is, have a different tid per target, and then have each of the
> /dev/VolGroup00/iSCSI? be LUN 1 on each target.  If you do it that way, then,
> you might want to change the name of the logical volumes to "iSCSI3", "iSCSI4",
> "iSCSI5", so that they match up with their target names.
>
>   
My understanding is also very weak as this is the first time I've used 
the tgtadm stuff.  I found little online on using multiple targets and 
the docs don't help much either. I just saw Dan's email as well and can 
wait until for people to weigh in.

I will admit I was a flip-flopper on the naming.  I originally had the 
volumes and mount points named to match the nodes but then my OCD forced 
me to change them to look "cleaner" as starting at iscsi3 just felt 
dirty to me...:)  But its no problem to change them to match the nodes.

-mark
> Chris Lalancette
>   




More information about the ovirt-devel mailing list