From 7a8fcdb611c88845170bb677b2b0b27c455c525e Mon Sep 17 00:00:00 2001 From: anthony Date: Mon, 7 Feb 2011 14:43:57 -0800 Subject: [PATCH] support lvmohba on copy_from/to_secondary --- .../vm/hypervisor/xenserver/copy_vhd_from_secondarystorage.sh | 2 +- scripts/vm/hypervisor/xenserver/copy_vhd_to_secondarystorage.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/vm/hypervisor/xenserver/copy_vhd_from_secondarystorage.sh b/scripts/vm/hypervisor/xenserver/copy_vhd_from_secondarystorage.sh index d2ed050cb9b..142ad18c677 100755 --- a/scripts/vm/hypervisor/xenserver/copy_vhd_from_secondarystorage.sh +++ b/scripts/vm/hypervisor/xenserver/copy_vhd_from_secondarystorage.sh @@ -69,7 +69,7 @@ if [ $type == "nfs" ]; then fi mv /var/run/sr-mount/$sruuid/$uuid /var/run/sr-mount/$sruuid/${uuid}.vhd xe sr-scan uuid=$sruuid -elif [ $type == "lvmoiscsi" -o $type == "lvm" ]; then +elif [ $type == "lvmoiscsi" -o $type == "lvm" -o $type == "lvmohba"]; then size=$(vhd-util query -v -n $vhdfile) uuid=$(xe vdi-create sr-uuid=$sruuid virtual-size=${size}MiB type=user name-label="cloud") if [ $? -ne 0 ]; then diff --git a/scripts/vm/hypervisor/xenserver/copy_vhd_to_secondarystorage.sh b/scripts/vm/hypervisor/xenserver/copy_vhd_to_secondarystorage.sh index 65800dbe994..67450686e68 100755 --- a/scripts/vm/hypervisor/xenserver/copy_vhd_to_secondarystorage.sh +++ b/scripts/vm/hypervisor/xenserver/copy_vhd_to_secondarystorage.sh @@ -70,7 +70,7 @@ if [ $type == "nfs" ]; then cleanup exit 0 fi -elif [ $type == "lvmoiscsi" -o $type == "lvm" ]; then +elif [ $type == "lvmoiscsi" -o $type == "lvm" -o $type == "lvmohba" ]; then lvchange -ay /dev/VG_XenStorage-$sruuid/VHD-$vdiuuid if [ $? -ne 0 ]; then echo "9#lvm can not make VDI $vdiuuid visiable"