New feature description Recommend that the "WARNING: PV /dev/mapper/luks- in VG is using an old PV header, modify the VG to update." and other PV warning messages for the PV header be updated to an ERROR message. An invalid PV header will keep a VG and LV from mounting correctly, so it should be reported as an error to ensure it's corrected. If not an ERROR, the message should state that a PV header will prevent activation of the VG. Version-Release number of selected component (if applicable): XX@XX:~$ sudo vgchange --version LVM version: 2.03.07(2) (2019-11-30) Library version: 1.02.167 (2019-11-30) Driver version: 4.41.0 How reproducible: I did a DD backup of an encrypted LUKS volume from an Ubuntu 18.04 installation this past weekend, and attempted to open it on a fresh Ubuntu 20.04 installation. I was unable to activate the volume at all, was given warnings about size . vgchange -ay was similarly unsuccessful. After a lot of googling, and walking away from it for a while, I discovered vgck, which gave me the notification that the PV header was out of date and told me to fix it, which vgchange nor other commands (vgscan, etc) told me. After replacing the header, the whole LUKS volume mounted just fine. Update: Checking /var/log/syslog, it is mentioned in the log when attempting as a WARNING. Steps to Reproduce: 1. BUild a LUKS volume under Ubuntu 18.04 with the stock LVM impl 2. DD to an IMG file 3. Move IMG File to 20.04 4. Attempt to mount via loopback device and unencrypt Actual results: VGchange results in VG and LV not activating. SYSLOG shows similar warnings to vgck(). Requires vgck() to scan and correct the issue. ONce corrected, VG activiates just fine. Probably should be an ERROR since the PV header stops execution and requires a correction from vgck() Expected results: I'd expect it to mount the VG with the old header with a WARNING, or not mount and give ERROR for not being able to mount due to PV header being out of date. Additional info: Milan Broz from cryptsetup() says that the appropriate commit to look at for a fix is: https://sourceware.org/git/?p=lvm2.git;a=commit;h=ba7ff96faff052c6145c71222ea5047a6bcee33b
> I was unable to activate the volume at all, was given > warnings about size . vgchange -ay was similarly unsuccessful. Activation works fine for me with these warnings, was there any other error message? > Actual results: > VGchange results in VG and LV not activating. SYSLOG shows similar warnings > to vgck(). Requires vgck() to scan and correct the issue. ONce corrected, > VG activiates just fine. Probably should be an ERROR since the PV header > stops execution and requires a correction from vgck() Can you copy the actual command output from the failing commands? (Or even better the -vvvv output of the failing activation command?) Activating a VG or LV works fine for me with the old header and the warnings (see below). > mount and give ERROR for not being able to mount due to PV header being out > of date. I believe you're referring to the lvm activation command, and not the fs mount command? # lvs f4 WARNING: PV /dev/sdf in VG f4 is using an old PV header, modify the VG to update. LV VG Attr LSize lvol0 f4 -wi------- 4.00m # lvchange -ay f4 WARNING: PV /dev/sdf in VG f4 is using an old PV header, modify the VG to update. # lvs f4 WARNING: PV /dev/sdf in VG f4 is using an old PV header, modify the VG to update. LV VG Attr LSize lvol0 f4 -wi-a----- 4.00m # lvchange -an f4 WARNING: PV /dev/sdf in VG f4 is using an old PV header, modify the VG to update. # vgck --updatemetadata f4 WARNING: PV /dev/sdf in VG f4 is using an old PV header, modify the VG to update. WARNING: updating PV header on /dev/sdf for VG f4. # lvs f4 LV VG Attr LSize lvol0 f4 -wi------- 4.00m
I will attempt again on my machine this week, apologies for the silence on my part. Mike