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

Daniel P. Berrange berrange at redhat.com
Mon Mar 24 14:33:34 UTC 2008


On Mon, Mar 24, 2008 at 10:09:05AM -0400, 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.
> 
> <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
> 
> <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:

Nah, you want the same target on all hosts so you can do migration and still
see the same storage. So one target, with 3 LUNS is a good setup IMHO.

Dan.
-- 
|: Red Hat, Engineering, Boston   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the ovirt-devel mailing list