diff options
author | David Lehman <dlehman@redhat.com> | 2009-03-13 14:15:25 -0500 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2009-03-13 17:15:20 -0500 |
commit | fa67c6c414d1065c9bc1b626129c80bee81720c1 (patch) | |
tree | 72f8e9e4e99c3424b107f2d6d312a6c6703a5fef /storage/devices.py | |
parent | 7e6abe78159c8d7719fb2dacf6c59ffb9bd12b3a (diff) | |
download | anaconda-fa67c6c414d1065c9bc1b626129c80bee81720c1.tar.gz anaconda-fa67c6c414d1065c9bc1b626129c80bee81720c1.tar.xz anaconda-fa67c6c414d1065c9bc1b626129c80bee81720c1.zip |
Don't traceback if vg.teardown fails in recursive teardown.
It's possible that another lv in the same vg either has a
filesystem mounted or an active luks mapping, so just carry
on.
Diffstat (limited to 'storage/devices.py')
-rw-r--r-- | storage/devices.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/storage/devices.py b/storage/devices.py index fffebca84..39ffcf74d 100644 --- a/storage/devices.py +++ b/storage/devices.py @@ -1860,7 +1860,13 @@ class LVMLogicalVolumeDevice(DMDevice): lvm.lvdeactivate(self.vg.name, self._name) if recursive: - self.vg.teardown(recursive=recursive) + # It's likely that teardown of a VG will fail due to other + # LVs being active (filesystems mounted, &c), so don't let + # it bring everything down. + try: + self.vg.teardown(recursive=recursive) + except Exception as e: + log.debug("vg %s teardown failed; continuing" % self.vg.name) def create(self, intf=None): """ Create the device. """ |