There are a number of hidden LVs that will show up if we don't
filter them. At this time we will limit to basic LV types that
we can perform operations on.
Signed-off-by: Tony Asleson <tasleson(a)redhat.com>
---
targetd/block.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/targetd/block.py b/targetd/block.py
index 9119a44..5470752 100644
--- a/targetd/block.py
+++ b/targetd/block.py
@@ -107,7 +107,8 @@ def volumes(req, pool):
vg_name, lv_pool = get_vg_lv(pool)
with vgopen(vg_name) as vg:
for lv in vg.listLVs():
- if lv.getName() != lv_pool:
+ attrib = lv.getAttr()
+ if attrib[0] == 'V' or attrib[0] == '-':
output.append(dict(name=lv.getName(), size=lv.getSize(),
uuid=lv.getUuid()))
return output
--
1.8.2.1