storage/lvm: clean -snap LV on volume removal
This commit is contained in:
parent
466bf89aae
commit
96bd734852
@ -323,9 +323,12 @@ class ThinVolume(qubes.storage.Volume):
|
|||||||
|
|
||||||
def remove(self):
|
def remove(self):
|
||||||
assert self.vid
|
assert self.vid
|
||||||
if self.is_dirty():
|
try:
|
||||||
cmd = ['remove', self._vid_snap]
|
if os.path.exists('/dev/' + self._vid_snap):
|
||||||
qubes_lvm(cmd, self.log)
|
cmd = ['remove', self._vid_snap]
|
||||||
|
qubes_lvm(cmd, self.log)
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
||||||
self._remove_revisions(self.revisions.keys())
|
self._remove_revisions(self.revisions.keys())
|
||||||
if not os.path.exists(self.path):
|
if not os.path.exists(self.path):
|
||||||
|
Loading…
Reference in New Issue
Block a user