From 28ed0a570fee0ae2cba9bc05e04e374880196c85 Mon Sep 17 00:00:00 2001 From: Vratislav Podzimek Date: Tue, 2 Jun 2015 12:57:26 +0200 Subject: [PATCH] Don't crash when processing cached LVs Just ignore the unsupported "sub-LVs" and consider cached LVs normal LVs. --- blivet/populator.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/blivet/populator.py b/blivet/populator.py index 157178ae0..9514afcd1 100644 --- a/blivet/populator.py +++ b/blivet/populator.py @@ -937,6 +937,9 @@ def addLV(lv): if lv_name.endswith("_pmspare]"): # spare metadata area for any thin pool that needs repair return + elif lv_name.endswith("_cmeta]"): + # cache metadata volume (skip, we ignore cache volumes) + return # raid metadata volume lv_name = re.sub(r'_[tr]meta.*', '', lv_name[1:-1]) @@ -974,7 +977,7 @@ def addLV(lv): elif lv_name.endswith(']'): # Internal LVM2 device return - elif lv_attr[0] not in '-mMrRoO': + elif lv_attr[0] not in '-mMrRoOC': # Ignore anything else except for the following: # - normal lv # m mirrored @@ -983,6 +986,7 @@ def addLV(lv): # R raid without initial sync # o origin # O origin with merging snapshot + # C cached LV return lv_dev = self.getDeviceByUuid(lv_uuid)