From fd5386cd472ea59f66a5cb7f319b9406dfa7deb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 7 Jun 2017 01:21:51 +0200 Subject: [PATCH] storage/lvm: prefix VM LVM volumes with 'vm-' This will allow filtering them out in udev rules - to not parse any of it. QubesOS/qubes-issues#2319 --- qubes/storage/lvm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qubes/storage/lvm.py b/qubes/storage/lvm.py index a31930639..9733a8a18 100644 --- a/qubes/storage/lvm.py +++ b/qubes/storage/lvm.py @@ -134,7 +134,7 @@ def init_volume(self, vm, volume_config): assert self.name - volume_config['vid'] = "{!s}/{!s}-{!s}".format( + volume_config['vid'] = "{!s}/vm-{!s}-{!s}".format( self.volume_group, vm_name, volume_config['name']) volume_config['volume_group'] = self.volume_group @@ -180,7 +180,7 @@ def remove(self, volume): def rename(self, volume, old_name, new_name): ''' Called when the domain changes its name ''' - new_vid = "{!s}/{!s}-{!s}".format(self.volume_group, new_name, + new_vid = "{!s}/vm-{!s}-{!s}".format(self.volume_group, new_name, volume.name) if volume.save_on_stop: cmd = ['clone', volume.vid, new_vid]