mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
use soft mount for secondary storage
This commit is contained in:
parent
b2f8c4bb2b
commit
c00d663df2
@ -48,7 +48,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mount -o tcp,ro $mountpoint $localmp
|
||||
mount -o tcp,soft,ro,timeo=133,retrans=1 $mountpoint $localmp
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "6#can't mount $mountpoint to $localmp"
|
||||
exit 0
|
||||
|
||||
@ -56,7 +56,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mount -o tcp $mountpoint $localmp
|
||||
mount -o tcp,soft,timeo=133,retrans=1 $mountpoint $localmp
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "6#can't mount $mountpoint to $localmp"
|
||||
exit 0
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
usage() {
|
||||
printf "Usage: %s [vhd file in secondary storage] [template directory in secondary storage] \n" $(basename $0)
|
||||
}
|
||||
|
||||
options='tcp,soft,timeo=133,retrans=1'
|
||||
cleanup()
|
||||
{
|
||||
if [ ! -z $snapshotdir ]; then
|
||||
@ -47,7 +47,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mount -o tcp $snapshoturl $snapshotdir
|
||||
mount -o $options $snapshoturl $snapshotdir
|
||||
if [ $? -ne 0 ]; then
|
||||
rmdir $snapshotdir
|
||||
echo "5#can not mount $snapshoturl to $snapshotdir"
|
||||
@ -63,7 +63,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mount -o tcp $templateurl $templatedir
|
||||
mount -o $options $templateurl $templatedir
|
||||
if [ $? -ne 0 ]; then
|
||||
rmdir $templatedir
|
||||
templatedir=""
|
||||
|
||||
@ -284,9 +284,9 @@ def makedirs(path):
|
||||
|
||||
def mount(remoteDir, localDir):
|
||||
makedirs(localDir)
|
||||
|
||||
options = "soft,tcp,timeo=133,retrans=1"
|
||||
try:
|
||||
cmd = ['mount', '-o', 'tcp', remoteDir, localDir]
|
||||
cmd = ['mount', '-o', options, remoteDir, localDir]
|
||||
txt = util.pread2(cmd)
|
||||
except:
|
||||
txt = ''
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user