Skip to content

Commit

Permalink
storage/lvm: prefix VM LVM volumes with 'vm-'
Browse files Browse the repository at this point in the history
This will allow filtering them out in udev rules - to not parse any of
it.

QubesOS/qubes-issues#2319
  • Loading branch information
marmarek committed Jun 9, 2017
1 parent fd3f19d commit fd5386c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qubes/storage/lvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit fd5386c

Please sign in to comment.