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@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org

Reply via email to