Skip to content

Commit

Permalink
storage/lvm: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarek committed Jun 26, 2017
1 parent a748b39 commit 28f78ed
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions qubes/storage/lvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def list_volumes(self):
# implementation detail volume
continue
config = {
'pool': self.name,
'pool': self,
'vid': vid,
'name': vid,
'volume_group': self.volume_group,
Expand Down Expand Up @@ -305,8 +305,6 @@ def import_volume(self, src_volume):
if not src_volume.save_on_stop:
return self

src_path = src_volume.export()

# HACK: neat trick to speed up testing if you have same physical thin
# pool assigned to two qubes-pools i.e: qubes_dom0 and test-lvm
# pylint: disable=line-too-long
Expand All @@ -316,7 +314,7 @@ def import_volume(self, src_volume):
qubes_lvm(cmd, self.log)
else:
self.create()

src_path = src_volume.export()
cmd = ['sudo', 'dd', 'if=' + src_path, 'of=/dev/' + self.vid,
'conv=sparse']
subprocess.check_call(cmd)
Expand Down

0 comments on commit 28f78ed

Please sign in to comment.