Skip to content

Commit aad64a5

Browse files
committed
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
1 parent 17abb3e commit aad64a5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎scripts/vm/hypervisor/xenserver/copy_vhd_from_secondarystorage.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ usage() {
1010
cleanup()
1111
{
1212
if [ ! -z $localmp ]; then
13-
umount $localmp
13+
umount -fl $localmp
1414
if [ $? -eq 0 ]; then
1515
rm $localmp -rf
1616
fi
@@ -48,7 +48,7 @@ if [ $? -ne 0 ]; then
4848
exit 0
4949
fi
5050

51-
mount $mountpoint $localmp
51+
mount $mountpoint $localmp -r
5252
if [ $? -ne 0 ]; then
5353
echo "6#cann't mounbt $mountpoint to $localmp"
5454
exit 0

0 commit comments

Comments
 (0)