tests/lvm: fix checking lvm pool existence
If pool or group name have '-', it will be mangled as '--' in /dev/mapper. Use /dev/VG_NAME/LV_NAME symlink instead. Related QubesOS/qubes-issues#4332
This commit is contained in:
parent
1ae6abdff5
commit
15cf593bc5
@ -42,7 +42,7 @@ else:
|
||||
|
||||
def lvm_pool_exists(volume_group, thin_pool):
|
||||
''' Returns ``True`` if thin pool exists in the volume group. '''
|
||||
path = "/dev/mapper/{!s}-{!s}".format(volume_group, thin_pool)
|
||||
path = "/dev/{!s}/{!s}".format(volume_group, thin_pool)
|
||||
return os.path.exists(path)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user