diff --git a/qubes/storage/lvm.py b/qubes/storage/lvm.py index a8bf6432..933d62f9 100644 --- a/qubes/storage/lvm.py +++ b/qubes/storage/lvm.py @@ -272,6 +272,9 @@ class ThinPool(qubes.storage.Pool): continue if vol_info['pool_lv'] != self.thin_pool: continue + if vid.endswith('-snap'): + # implementation detail volume + continue config = { 'pool': self.name, 'vid': vid, diff --git a/qubes/tools/qvm_block.py b/qubes/tools/qvm_block.py index 9385a009..92019f46 100644 --- a/qubes/tools/qvm_block.py +++ b/qubes/tools/qvm_block.py @@ -115,11 +115,14 @@ def list_volumes(args): for domain in domains: # gather the domain names try: for volume in domain.attached_volumes: - if not args.internal and volume.internal: - continue try: - volume_data = vd_dict[volume.pool][volume.vid] - volume_data.domains += [(domain.name, volume.name)] + if not args.internal and volume.internal: + # some pools (LVM) may set 'internal' flag only when + # listing volumes of specific domain + del vd_dict[volume.pool][volume.vid] + else: + volume_data = vd_dict[volume.pool][volume.vid] + volume_data.domains += [(domain.name, volume.name)] except KeyError: # Skipping volume continue