From ade075cfe437e83db343557fa632a233fea8881b Mon Sep 17 00:00:00 2001 From: edison Date: Thu, 7 Oct 2010 11:10:08 -0700 Subject: [PATCH] change the mount path to secondary storage, instead of snapshot path --- setup/bindir/cloud-migrate-snapshot.in | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/setup/bindir/cloud-migrate-snapshot.in b/setup/bindir/cloud-migrate-snapshot.in index 26cac92b09a..7b0f309c083 100644 --- a/setup/bindir/cloud-migrate-snapshot.in +++ b/setup/bindir/cloud-migrate-snapshot.in @@ -2,7 +2,7 @@ #set -x Usage() { echo "migrate snapshots created from CloudStack 2.1.3 to 2.1.4 and later:" - echo "$0 -m {snapshot mount point} " + echo "$0 -m {secondary-storage mount point} " exit 1 } @@ -31,6 +31,18 @@ then exit 2 fi +if [ ! -f $mountPath ] +then + echo "$mountPath does not exist, please specify a valid path" + exit 2 +fi + +mountPath=$mountPath/snapshots +if [ ! -f $mountPath ] +then + echo "No snapshots exit, nothing to do" + exit 0 +fi echo "0: sanity checking all the snapshots under $mountPath" foundBadTemplt=0