LVM2 Integrity feature breaks LV activation?
1
vote
1
answer
1108
views
I've been trying to enable the integrity feature on my new LVM2 volumes. I use a command like this to create the lv:
sudo lvcreate --type raid1 --mirrors 1 --size 20g --raidintegrity y --name RAID MY_VG
The lv appears to be created successfully and I can see it building itself in the Cpy%Sync
output of lvs
. All seems to go well and it eventually reaches 100%.
I can create a filesystem (been playing with xfs and btrfs), I can mount it, write to it and the volume appears to be working flawlessly. I updated fstab and it mounts and unmounts smoothly with a simple sudo mount -a
for example.
#### Then I reboot and the logical volume is never auto activated
So fstab cannot find the filesystem to mount. I can fix this manually with a simple sudo vgchange -ay MY_VG
and then a sudo mount -a
but something seems wrong because...
#### This is only a problem for Logical Volumes with Integrity enabled.
I created a second logical volume without integrity (and that is the only difference):
sudo lvcreate --type raid1 --mirrors 1 --size 20g --raidintegrity n --name RAID_TEST MY_VG
And after reboot RAID_TEST is activated and available to be mounted immediately, but my original logical volume with integrity (named just RAID) is still deactivated at boot. So because this test LV is activated I know there is nothing wrong with the PVs nor the VG. The issue has to be with the LV configuration with integrity but I can't find any docs that suggest I am doing anything wrong.
I have reproduced this on 2 different servers with various different combinations and the results are always the same and its only the volumes with integrity enabled that behave this way and never auto-activate. Zero obvious errors in system logs, journalctl, nor systemctl status of any lvm units.
What is going on?
I can see zero errors with the devices or lvm when I check journalctl. The only output all looks normal (and its the exact same log messages for every logical volume and volume group in my system regardless of whether its a volume with integrity enabled).
At this point I am wondering if integrity is actually a ready-to-use feature of LVM2. My experience has been extremely janky with very very poor documentation. The man pages for lvchange with respect to integrity features conflict with the raw source code of lvchange (which I eventually had to go read the flipping source). The source code also contradicts the RedHat documentation around lvm integrity . None of that explains why this is happening though.
Can anyone help? It would be very appreciated. At this point it feels like I need to abandon LVM if I want integrity protection.
Asked by gnomed
(113 rep)
Sep 18, 2022, 09:44 PM
Last activity: Sep 19, 2022, 07:54 PM
Last activity: Sep 19, 2022, 07:54 PM