Exemple #1
0
 def setReadonly(self, lvName, readonly):
     path = self._getPath(lvName)
     if self.lvs[lvName].readonly != readonly:
         uuids = util.findall_uuid(path)
         ns = lvhdutil.NS_PREFIX_LVM + uuids[0]
         lock = Lock(uuids[1], ns)
         lock.acquire()
         lvutil.setReadonly(path, readonly)
         lock.release()
         self.lvs[lvName].readonly = readonly
Exemple #2
0
 def setReadonly(self, lvName, readonly):
     path = self._getPath(lvName)
     if self.lvs[lvName].readonly != readonly:
         uuids = util.findall_uuid(path)
         ns = lvhdutil.NS_PREFIX_LVM + uuids[0]
         lock = Lock(uuids[1], ns)
         lock.acquire()
         lvutil.setReadonly(path, readonly)
         lock.release()
         self.lvs[lvName].readonly = readonly
Exemple #3
0
 def setReadonly(self, lvName, readonly):
     path = self._getPath(lvName)
     if self.lvs[lvName].readonly != readonly:
         uuids = util.findall_uuid(path)
         ns = lvhdutil.NS_PREFIX_LVM + uuids[0]
         # Taking this lock is needed to avoid a race condition
         # with tap-ctl open (which is now taking the same lock)
         lock = Lock("lvchange-p", ns)
         lock.acquire()
         lvutil.setReadonly(path, readonly)
         lock.release()
         self.lvs[lvName].readonly = readonly
Exemple #4
0
 def setReadonly(self, lvName, readonly):
     path = self._getPath(lvName)
     if self.lvs[lvName].readonly != readonly:
         uuids = util.findall_uuid(path)
         ns = lvhdutil.NS_PREFIX_LVM + uuids[0]
         # Taking this lock is needed to avoid a race condition
         # with tap-ctl open (which is now taking the same lock)
         lock = Lock("lvchange-p", ns)
         lock.acquire()
         lvutil.setReadonly(path, readonly)
         lock.release()
         self.lvs[lvName].readonly = readonly
Exemple #5
0
 def setReadonly(self, lvName, readonly):
     path = self._getPath(lvName)
     if self.lvs[lvName].readonly != readonly:
         lvutil.setReadonly(path, readonly)
         self.lvs[lvName].readonly = readonly
Exemple #6
0
 def setReadonly(self, lvName, readonly):
     path = self._getPath(lvName)
     lvutil.setReadonly(path, readonly)
     self.lvs[lvName].readonly = readonly