mirror of https://github.com/apache/cloudstack.git
bug 8291: get physical vdi size before dd
status 8291: resolved fixed
This commit is contained in:
parent
fe67fa851a
commit
36778f4e3c
|
|
@ -77,6 +77,12 @@ elif [ $type == "lvmoiscsi" -o $type == "lvm" ]; then
|
|||
cleanup
|
||||
exit 0
|
||||
fi
|
||||
lvsize=$(xe vdi-param-get uuid=$uuid param-name=physical-utilisation)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "12#failed to get physical size of vdi $uuid"
|
||||
cleanup
|
||||
exit 0
|
||||
fi
|
||||
lvchange -ay /dev/VG_XenStorage-$sruuid/VHD-$uuid
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "10#lvm can not make VDI $uuid visiable"
|
||||
|
|
@ -89,12 +95,6 @@ elif [ $type == "lvmoiscsi" -o $type == "lvm" ]; then
|
|||
cleanup
|
||||
exit 0
|
||||
fi
|
||||
lvsize=$(xe vdi-param-get uuid=$uuid param-name=physical-utilisation)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "12#failed to get physical size of vdi $uuid"
|
||||
cleanup
|
||||
exit 0
|
||||
fi
|
||||
vhd-util modify -s $lvsize -n /dev/VG_XenStorage-$sruuid/VHD-$uuid
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "13#failed to set new vhd physical size for vdi vdi $uuid"
|
||||
|
|
|
|||
Loading…
Reference in New Issue