Related: rhbz#1144410
---
blivet/devicetree.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 1a7b144..3f24ed9 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -700,7 +700,13 @@ class DeviceTree(object):
vg_name = udev.device_get_lv_vg_name(info)
device = self.getDeviceByName(vg_name)
if not device:
+ # this means something is messed up, like a corrupt gpt disklabel
+ # that the kernel is perfectly happy with but parted refuses to use
log.error("failed to find vg '%s' after scanning pvs",
vg_name)
+ try:
+ lvm.vgdeactivate(vg_name)
+ except LVMError as e:
+ log.error("failed to deactivate vg: %s", e)
# Don't return the device like we do in the other addUdevFooDevice
# methods. The device we have here is a vg, not an lv.
--
1.9.3