On Fri, Jan 7, 2011 at 11:47 PM, Roberto Sassu <span dir="ltr"><<a href="mailto:roberto.sassu@polito.it">roberto.sassu@polito.it</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I have some questions about the storage management.<br>
First, even if the transfer manager driver is LVM, the<br>
uploaded image is placed in a file in the directory<br>
/srv/cloud/one/var/images (self contained installation).<br>
Does it is possible to store uploaded images directly<br>
in a LVM logical volume?<br></blockquote><div><br></div><div>Hey Roberto,</div><div><br></div><div>Not "directly", but the scenario you're describing is possible - for each image you want to be able</div><div>

to use that way, you need to create a logical volume and upload the image in there, on</div><div>each computing node.</div><div><br></div><div>Then, in VM templates, use something like:</div><div><br></div><div><font class="Apple-style-span" face="'courier new', monospace">DISK = [ source = "/dev/vg/volumename", ... ]</font></div>

<div><br></div><div>Then tm_clone will indeed create a lvm snapshot from the pre-created image volume - but,</div><div>to reiterate, the volume you're referencing in your template must exist on each node.</div><div><br>

</div><div>I have a (simple,relatively rough) python script that'll take care of this pre-deployment, you can find it here: <a href="https://gist.github.com/770767">https://gist.github.com/770767</a></div><div><br></div>

<div><font class="Apple-style-span" color="#666666">Note - while testing this, I ran into an issue with etc/tm_lvm/tm_lvmrc not coming up with</font></div><div><font class="Apple-style-span" color="#666666">the right lvm volume names for some reason; it ended up generating the same name for all</font></div>

<div><font class="Apple-style-span" color="#666666">volumes, so creating multiple VMs failed (but creating only one worked). I had to change:</font></div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">

<div class="gmail_quote"><div><div><font class="Apple-style-span" face="'courier new', monospace" color="#666666">echo $1 |$SED -e 's%^.*/\([^/]*\)/images.*$%\1%'</font></div></div></div></blockquote><font class="Apple-style-span" face="arial, helvetica, sans-serif" color="#666666">to</font><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">

<div class="gmail_quote"><div><div><font class="Apple-style-span" face="'courier new', monospace" color="#666666">echo $1 | rev | cut -d/ -f3 | rev</font></div></div></div></blockquote><div class="gmail_quote"><div>

<font class="Apple-style-span" color="#666666"><br></font></div><div><font class="Apple-style-span" color="#666666">I'd be interested to know if you need this change as well, so I can submit a bug.</font></div><div><br>

</div><div><br></div><div>Regards,</div></div><div>Stefan Praszalowicz</div><div><b><br></b></div>