[one-users] Resize operation to one and sunstone

Jaime Melis jmelis at opennebula.org
Fri Aug 31 07:59:46 PDT 2012


Hello Juanra,

could you please describe in more detail the functionality you want to
achieve? I have the feeling what you ask is a bit tricky since it involves
adding new states in the C++ core.

Is something like this what you're looking for?
onevm resize <vm_id> <disk_id> +<size>
which will do:
1) LV/qemu-img convert in the host extending the disk by +<size>
2) onevm reset <vm_id>

Note that the onevm resize command doesn't exist, I'm just trying to figure
out if that's what you  want.

cheers,
Jaime
On Fri, Aug 10, 2012 at 11:26 AM, Juanra <amon.raj at gmail.com> wrote:

> Hello list.
>
> I have made a shell script that resizes a disk to get all free space. I
> put it in rc.local and after it I run resize2fs.
>
> I am using lvm and qemu and first I resize the disk in host, but I want to
> know how can I add a command to opennebula that calls lvresize or qemu-img
> convert ??.
>
>
> Thanks in advice.
>
> PD: This is script I am using.
>
> #!/bin/bash
>
> INICIO=`sfdisk -u S -l /dev/vda | sed -n '6 p' | sed "s/^ *//;s/ *$//;s/
> \{1,\}/ /g" | cut -d" " -f2`
> FIN=`sfdisk -u S -l /dev/vda | sed -n '6 p' | sed "s/^ *//;s/ *$//;s/
> \{1,\}/ /g" | cut -d" " -f3`
> TAM=`sfdisk -u S -s /dev/vda`
>
> if [ "$TAM" != "$FIN" ]; then
>         echo $INICIO $FIN $TAM > /root/resize.txt
>         echo "$INICIO,,L *" | sfdisk -u S -f /dev/vda
>         shutdown -rF now
> fi
>
>
> _______________________________________________
> 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/20120831/505769e7/attachment-0002.htm>


More information about the Users mailing list