fix a bug about backupsnapshot to nfs primary storage

This commit is contained in:
anthony 2010-08-28 19:17:40 -07:00
parent c9da15ff5e
commit a517338ac7

View File

@ -458,12 +458,16 @@ def getIsTrueString(stringValue):
return booleanValue
def makeUnavailable(uuid, primarySRPath, isISCSI):
if not isISCSI:
return
VHD = getVHD(uuid, isISCSI)
path = os.path.join(primarySRPath, VHD)
manageAvailability(path, '-an')
return
def manageAvailability(path, value):
if path.__contains__("/var/run/sr-mount"):
return
util.SMlog("Setting availability of " + path + " to " + value)
try:
cmd = ['/usr/sbin/lvchange', value, path]