Hello list.<br><br>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.<br><br>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 ??.<br>

<br><br>Thanks in advice.<br><br>PD: This is script I am using.<br><br>#!/bin/bash<br><br>INICIO=`sfdisk -u S -l /dev/vda | sed -n '6 p' | sed "s/^ *//;s/ *$//;s/ \{1,\}/ /g" | cut -d" " -f2`<br>

FIN=`sfdisk -u S -l /dev/vda | sed -n '6 p' | sed "s/^ *//;s/ *$//;s/ \{1,\}/ /g" | cut -d" " -f3`<br>TAM=`sfdisk -u S -s /dev/vda`<br><br>if [ "$TAM" != "$FIN" ]; then<br>
        echo $INICIO $FIN $TAM > /root/resize.txt<br>
        echo "$INICIO,,L *" | sfdisk -u S -f /dev/vda<br>        shutdown -rF now<br>fi<br><br>