From aad64a517023e8bee7664425b65a5f5be7ea671d Mon Sep 17 00:00:00 2001 From: Frank Date: Mon, 16 May 2011 13:50:45 -0700 Subject: [PATCH] Fix in XenServer, when do primarystorage downlaod command, mount secondary storage as readonly. And umount with options -fl to avoid hang if at that time NFS server down --- .../vm/hypervisor/xenserver/copy_vhd_from_secondarystorage.sh | 4 ++-- 1 file 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 098284bc8fe..c10882d5d50 100755 --- a/scripts/vm/hypervisor/xenserver/copy_vhd_from_secondarystorage.sh +++ b/scripts/vm/hypervisor/xenserver/copy_vhd_from_secondarystorage.sh @@ -10,7 +10,7 @@ usage() { cleanup() { if [ ! -z $localmp ]; then - umount $localmp + umount -fl $localmp if [ $? -eq 0 ]; then rm $localmp -rf fi @@ -48,7 +48,7 @@ if [ $? -ne 0 ]; then exit 0 fi -mount $mountpoint $localmp +mount $mountpoint $localmp -r if [ $? -ne 0 ]; then echo "6#cann't mounbt $mountpoint to $localmp" exit 0