[one-users] Opennebula storage question

Stefan P deubeulyou at gmail.com
Sat Jan 8 03:40:48 PST 2011

On Fri, Jan 7, 2011 at 11:47 PM, Roberto Sassu <roberto.sassu at polito.it>wrote:

> I have some questions about the storage management.
> First, even if the transfer manager driver is LVM, the
> uploaded image is placed in a file in the directory
> /srv/cloud/one/var/images (self contained installation).
> Does it is possible to store uploaded images directly
> in a LVM logical volume?

Hey Roberto,

Not "directly", but the scenario you're describing is possible - for each
image you want to be able
to use that way, you need to create a logical volume and upload the image in
there, on
each computing node.

Then, in VM templates, use something like:

DISK = [ source = "/dev/vg/volumename", ... ]

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

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

Note - while testing this, I ran into an issue with etc/tm_lvm/tm_lvmrc not
coming up with
the right lvm volume names for some reason; it ended up generating the same
name for all
volumes, so creating multiple VMs failed (but creating only one worked). I
had to change:

echo $1 |$SED -e 's%^.*/\([^/]*\)/images.*$%\1%'


echo $1 | rev | cut -d/ -f3 | rev

I'd be interested to know if you need this change as well, so I can submit a

Stefan Praszalowicz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20110108/f625aa04/attachment-0002.htm>

More information about the Users mailing list