tests/lvm: fix checking lvm pool existence cont.
Commit 15cf593bc5
"tests/lvm: fix checking
lvm pool existence" attempted to fix handling '-' in pool name by using
/dev/VG/LV symlink. But those are not created for thin pools. Change
back to /dev/mapper, but include '-' mangling.
Related QubesOS/qubes-issues#4332
This commit is contained in:
parent
f023b3dd6e
commit
d2585aa871
@ -42,7 +42,9 @@ else:
|
||||
|
||||
def lvm_pool_exists(volume_group, thin_pool):
|
||||
''' Returns ``True`` if thin pool exists in the volume group. '''
|
||||
path = "/dev/{!s}/{!s}".format(volume_group, thin_pool)
|
||||
path = "/dev/mapper/{!s}-{!s}".format(
|
||||
volume_group.replace('-', '--'),
|
||||
thin_pool.replace('-', '--'))
|
||||
return os.path.exists(path)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user