[one-users] create lvm image from existing logical volume
Jaime Melis
jmelis at opennebula.org
Tue Jan 15 03:32:07 PST 2013
Hi Christopher,
no, that's not supported out of the box. To register a new LVM based image,
the source has to be a regular file located in the frontend (or an url).
However, you can patch a couple of files to make this work. It's not
difficult, but it may take a bit of time. This is how I would go about it:
* remotes/datastore/lvm/stat:
If $SRC can be split into two fields, separated by ':' , and the second
field starts with "/dev/" => then we can assume it's a LVM volumen located
in the host determined by the first field. Use lvs to return the size.
* remotes/datastore/lvm/cp:
Perform the same check to find out if $SRC is a block device. In that case,
add a new section where you dump the block device to the target LVM:
ssh_exec_and_log "$DST_HOST" "$SUDO $DD if=$SRC of=$DEV bs=64k" \
"Error dumping $SRC to $DST_HOST:$DEV"
I haven't tested this, so there will be typos and maybe I've missed out on
something, but in principle it's easily achievable.
cheers,
Jaime
On Mon, Jan 14, 2013 at 11:03 PM, christopher barry <cbarry at rjmetrics.com>wrote:
> All,
>
> I've been looking around, and I can't find out how to do this. Is this
> not possible?
>
> Thanks,
> -C
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
--
Jaime Melis
Project Engineer
OpenNebula - The Open Source Toolkit for Cloud Computing
www.OpenNebula.org | jmelis at opennebula.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20130115/b8eb7468/attachment-0002.htm>
More information about the Users
mailing list