LUKS-on-LVM inspection test: rename VGs and LVs

In preparation for a subsequent patch, rename "VG" to "Volume-Group", and
"LV<n>" to "Logical-Volume-<n>", in the LUKS-on-LVM inspection test.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2168506
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20230519140849.310774-3-lersek@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
This commit is contained in:
Laszlo Ersek
2023-05-19 16:08:48 +02:00
parent 83afd6d3d2
commit 58e2640233
2 changed files with 25 additions and 21 deletions

View File

@@ -224,23 +224,27 @@ EOF
# Create the Volume Group on /dev/sda2.
$g->pvcreate ('/dev/sda2');
$g->vgcreate ('VG', ['/dev/sda2']);
$g->lvcreate ('Root', 'VG', 32);
$g->lvcreate ('LV1', 'VG', 32);
$g->lvcreate ('LV2', 'VG', 32);
$g->lvcreate ('LV3', 'VG', 64);
$g->vgcreate ('Volume-Group', ['/dev/sda2']);
$g->lvcreate ('Root', 'Volume-Group', 32);
$g->lvcreate ('Logical-Volume-1', 'Volume-Group', 32);
$g->lvcreate ('Logical-Volume-2', 'Volume-Group', 32);
$g->lvcreate ('Logical-Volume-3', 'Volume-Group', 64);
# Format each Logical Group as a LUKS device, with a different password.
$g->luks_format ('/dev/VG/Root', 'FEDORA-Root', 0);
$g->luks_format ('/dev/VG/LV1', 'FEDORA-LV1', 0);
$g->luks_format ('/dev/VG/LV2', 'FEDORA-LV2', 0);
$g->luks_format ('/dev/VG/LV3', 'FEDORA-LV3', 0);
$g->luks_format ('/dev/Volume-Group/Root', 'FEDORA-Root', 0);
$g->luks_format ('/dev/Volume-Group/Logical-Volume-1', 'FEDORA-LV1', 0);
$g->luks_format ('/dev/Volume-Group/Logical-Volume-2', 'FEDORA-LV2', 0);
$g->luks_format ('/dev/Volume-Group/Logical-Volume-3', 'FEDORA-LV3', 0);
# Open the LUKS devices. This creates nodes like /dev/mapper/*-luks.
$g->cryptsetup_open ('/dev/VG/Root', 'FEDORA-Root', 'Root-luks');
$g->cryptsetup_open ('/dev/VG/LV1', 'FEDORA-LV1', 'LV1-luks');
$g->cryptsetup_open ('/dev/VG/LV2', 'FEDORA-LV2', 'LV2-luks');
$g->cryptsetup_open ('/dev/VG/LV3', 'FEDORA-LV3', 'LV3-luks');
$g->cryptsetup_open ('/dev/Volume-Group/Root',
'FEDORA-Root', 'Root-luks');
$g->cryptsetup_open ('/dev/Volume-Group/Logical-Volume-1',
'FEDORA-LV1', 'LV1-luks');
$g->cryptsetup_open ('/dev/Volume-Group/Logical-Volume-2',
'FEDORA-LV2', 'LV2-luks');
$g->cryptsetup_open ('/dev/Volume-Group/Logical-Volume-3',
'FEDORA-LV3', 'LV3-luks');
# Phony root filesystem.
$g->mkfs ('ext2', '/dev/mapper/Root-luks', blocksize => 4096, label => 'ROOT');