Nicolas,<div><br></div><div>it makes a lot of sense what you want to do. ZFS+iSCSI is a perfect fit for vm storage, some other IaaS solutions already use this combination (and I have developed some). Keep in mind that Nexenta is only a distro based upon OpenSolaris: OpenIndiana, FreeBSD... there are a lot of options with ZFS.</div>

<div><br></div><div>There are several things you should consider to implement this feature:</div><div>1) The code that matters is mostly in nova/virt/libvirt/connection.py for libvirt</div><div>2) You need to implement a new storage type: iscsi (<a href="http://libvirt.org/storage.html#StorageBackendISCSI">http://libvirt.org/storage.html#StorageBackendISCSI</a>)</div>

<div>3) You need to implement a feature to block-copy the source image to the backend iscsi storage</div><div>4) _cache_image method and most of _create_image should be developed thinking in 3)</div><div><br></div><div>I think the only reason to implement this feature is to develop a highly scalable storage system for instances, so a single storage system does not make sense. It should be able to manage a list storage systems as a pool and load balance them.</div>

<div><br></div><div>Some quick thoughts, good luck!</div><div>Diego</div><div><br clear="all"> -- <br><span style="border-collapse:separate;font-family:Times"><span style="border-collapse:collapse;font-family:arial,sans-serif"><div align="left" style="font-size:13px">

<div><font><span lang="ES" style="font-family:Arial">Diego Parrilla<br><a href="http://www.stackops.com/" title="file:///C:/Documents%20and%20Settings/carolina.capsir.per1/Application%20Data/Microsoft/Signatures/www.garrigues.com
www.garrigues.com" style="color:rgb(7,77,143)" target="_blank"><span title="file:///C:/Documents%20and%20Settings/carolina.capsir.per1/Application%20Data/Microsoft/Signatures/www.garrigues.com"></span></a></span></font><font face="Arial" size="2" style="font-family:arial,helvetica,sans-serif"><b>CEO</b><font size="1"><br>

</font></font><span style="border-collapse:separate;font-family:Times;font-size:medium"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"></span></span><b><font face="Arial" size="2" style="font-family:arial,helvetica,sans-serif"><a href="http://www.stackops.com/" target="_blank"><b>www.stackops.com</b></a> | </font></b><font face="Arial" size="2" style="font-family:arial,helvetica,sans-serif"><font size="1"> <a href="mailto:diego.parrilla@stackops.com" target="_blank">diego.parrilla@stackops.com</a></font></font><span style="border-collapse:separate;font-family:Times;font-size:medium"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><font color="#004438" face="Arial"><b><b><span lang="EN-GB" style="font-size:10pt"></span></b></b></font></span></span><font face="Arial" size="2" style="font-family:arial,helvetica,sans-serif"><font size="1"> | </font></font><span style="border-collapse:separate;font-family:Times;font-size:medium"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><font face="Arial" size="2" style="font-family:arial,helvetica,sans-serif"><font size="1">+34 649 94 43 29 | <a>skype:diegoparrilla</a></font></font></span></span><font face="Arial" size="2" style="font-family:arial,helvetica,sans-serif"><a href="http://www.stackops.com/" target="_blank"><b><br>

</b></a></font></div></div><div style="font-size:13px"><font color="#004438" face="Arial"><b><p><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Times;font-size:medium"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><span style="border-collapse:separate;font-family:Times;font-size:medium"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><font color="#004438" face="Arial"><b><b><span lang="EN-GB" style="font-size:10pt"><img src="http://stackops.s3-external-3.amazonaws.com/STACKOPSLOGO-ICON.png"></span></b></b></font></span></span></span></span></p>

</b></font></div></span></span><div><br></div><br>
<br><br><div class="gmail_quote">On Sun, Jun 10, 2012 at 11:15 AM, Nicolas de BONFILS <span dir="ltr"><<a href="mailto:openstack@nicolas2bonfils.com" target="_blank">openstack@nicolas2bonfils.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div>
<pre>Hi Stackers,<br><br>I got an idea/question about iscsi volume.<br><br>Actually the workflow is :</pre>
<ol>
<li>create an LVM pool</li>
<li>create a volume in this pool (with nova command or horizon UI)</li>
<li>share it with an iscsi target (the compute/volume node)</li>
<li>attach it with an iscsi initiator (the VM)</li>
</ol>
<p>I use zfs for other project, and I'm very interested in using it everywhere (when possible). One functionality zfs bring is zvol : it allows to create a block device from a zfs pool (a zfs property allow to share this device with iscsi).<br>

With this, a new workflow will be :</p>
<ol>
<li>create a zfs pool (zpool create <name> <device>)</li>
<li>create a zvol block device (zfs create -V <size> <poolname>/<volumename>)</li>
<li>set the zfs property to share it with iscsi (zfs set shareiscsi=on <poolname>/<volumename>)</li>
<li>attach it with an iscsi initiator (the VM)</li>
</ol>
<p>From what I read, the Nexenta guys do a lot of work around zfs, but for volume use I only found code to plug a Nexenta san (I do not have the hardware to build a san), but no solution to use zfs drive/pool directly.<br>

So my 2 questions are :</p>
<ol>
<li>are some people interested in it ?</li>
<li>does it seem possible to do it (maybe some one already try) ? Nova volume driver [<a href="https://github.com/openstack/nova/blob/master/nova/volume/driver.py" target="_blank">github.com</a>] got subclasses for specific cases, maybe a new zfs one.</li>


</ol>
<p> </p>
<p>Please discuss, submit ideas !</p><span class="HOEnZb"><font color="#888888">
<p>--- Nicolas</p>
</font></span></div>
<br>_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
<br></blockquote></div><br></div>