This bug was initially created as a copy of Bug #1855972
I am copying this bug because:
Also applies to RHEL8.2.0 (after applying the patch for BZ #1836269)
Description of problem:
Trying to install a system with a cached LV and PVs Luks encrypted, the installer complains with the following message:
Cache PVs must belong to the same VG as the cached LV
Kickstart excerpt:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
part pv.00 --ondisk=/dev/vda --size=1 --grow --encrypted --passphrase="redhat"
part pv.01 --ondisk=/dev/vdb --size=1 --grow --encrypted --passphrase="redhat"
volgroup rhel pv.00 pv.01
logvol swap --fstype="swap" --size=1024 --name=swap --vgname=rhel
logvol / --fstype="xfs" --size=8192 --name=root --vgname=rhel
logvol /data --fstype="xfs" --size=4096 --name=data --vgname=rhel --cachepvs=pv.01 --cachesize=8192 --cachemode=writeback
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
In the example above, /data is hosted on rhel/data LV with cache PV pv.01 encrypted.
Even though pv.01 is building "rhel" volume group, the code doesn't detect that.
My hypothesis is that there is no code to handle the fact that "pv.01" is not the PV here, but the luks-encrypted device /dev/vdb.
Version-Release number of selected component (if applicable):
RHEL7 and RHEL8.2.0
How reproducible:
ALWAYS
Steps to Reproduce:
1. Install a system with a kickstart having 2 disks (see attachment for kickstart)
Actual results:
"Cache PVs must belong to the same VG as the cached LV"
Expected results:
Installs fine
Additional info:
The "workaround" I found is to use encrypted filesystems instead of encrypted PVs:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
part pv.00 --ondisk=/dev/vda --size=1 --grow
part pv.01 --ondisk=/dev/vdb --size=1 --grow
volgroup rhel pv.00 pv.01
logvol swap --fstype="swap" --size=1024 --name=swap --vgname=rhel --encrypted --passphrase="redhat"
logvol / --fstype="xfs" --size=8192 --name=root --vgname=rhel --encrypted --passphrase="redhat"
logvol /data --fstype="xfs" --size=4096 --name=data --vgname=rhel --cachepvs=pv.01 --cachesize=8192 --cachemode=writeback --encrypted --passphrase="redhat"
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------