[libvirt-users] FYI: Notes on setting up KVM guests using iSCSI

David Ehle ehle at agni.phys.iit.edu
Wed May 5 20:51:43 UTC 2010


Daniel,

Thank you.  I was misunderstanding how iscsi iSCSI Enterprise Target 
Daemon /ietd.conf work. I was setting up multiple targets with only one 
LUN each, and thinking I was creating multiple LUNs on the same target.

So right way to set up multiple LUNS for one target under Ubuntu Karmic 
using iSCSI Enterprise Target via ietd.conf:

Target iqn.2010-04.gov.blah.blah.blah.keeper:vmstorage
 	<SNIP>
         # Logical Unit definition
         # You must define one logical unit at least.
         # Block devices, regular files, LVM, and RAID can be offered
         # to the initiators as a block device.
         Lun 0 Path=/dev/vg0/iscsi_pool,Type=fileio
         Lun 1 Path=/dev/vg0/test_pool,Type=fileio
         # Alias name for this target
         Alias VMStoragePool
 	<SNIP>

<NOT>

Target iqn.2010-04.gov.blah.blah.blah.keeper:vmstorage.lun0
 	Lun 0 Path=/dev/vg0/iscsi_pool,Type=fileio
 	ALIAS LUN0
Target iqn.2010-04.gov.blah.blah.blah.keeper:vmstorage.lun1
 	Lun 1 Path=/dev/vg0/test_pool,Type=fileio
 	ALIAS LUN1
</NOT>


To add additional volumes, additional LUNs will need to be created on the 
TARGET side, and then exported via iSCSI

After correcting my Target side configuration, I was able to create an 
iSCSI pool through virt-manager, and see the two LUNs as available 
volumes.


  On Wed, 5 May 2010, Daniel P. Berrange wrote:

> On Wed, May 05, 2010 at 08:50:57AM -0500, David Ehle wrote:
>>
>> Daniel,
>>
>> OK so I think I get it now. While for other storage backends one pool can
>> hold multiple volumes, when using iSCIS there is alwasy a 1 to 1
>> relationship for pool to volume? Each pool contains exactly one volume?
>
> No, each pool can contain multiple volumes. If you have created a iSCSI
> target and given it multiple LUNs, then you'll see multiple volumes in
> libvirt.
>
> See the virsh vol-list output in this example:
>
>>> http://berrange.com/posts/2010/05/05/provisioning-kvm-virtual-machines-on-iscsi-the-hard-way-part-2-of-2/
>
> for an iSCSI target with 2 LUNs
>
> Daniel
> -- 
> |: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
> |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.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 libvirt-users mailing list