Dear Maintainer,
* What led up to the situation?
I created a snapshot to safely test my application and then run lvconvert
--merge to undo the changes made to the system
* What exactly did you do (or not do) that was effective (or
ineffective)?
lvcreate --size 10G -s -n revert system/debian
... test my application ...
lvconvert --merge system/revert
reboot
* What was the outcome of this action?
After the restart, the restore was successful but the snapshot was not
removed after the job was completed:
debian system Owi-aos--- 100,00g 0,00
[revert] system Swi-aos--- 1,00g debian 0,00
* What outcome did you expect instead?
remove the snapshot at the end of the lvconvert process
debian system -wi-ao---- 100,00g
I can confirm that this bug also occurs in lvm2/2.03.07-1. Essentially, the merge operation appears to complete successfully, but the snapshot LV isn't automatically removed. Additionally, the snapshot LV cannot be manually removed via "lvremove". The workaround I used was to modify the VG metadata backup (located at /etc/lvm/backup) by removing the snapshot LV from within the "logical_volumes" section, restoring it via "vgcfgrestore", and then rebooting.
I tried version 2.03.10 by downloading it from the repository https://sourceware.org/git/?p=lvm2.git;a=summary, but the problem remains. I think you should report this type of problem to the developers ...
Dear maintenance, to remember that this problem still exists (and is necessary restart the system, after the snapshot revert process has completed) Thanks Antonio
Comparing the working lvm package (2.03.07-1+b1) with the next package that has the problem (2.03.09-1), after some tests I was able to solve the problem quite simply: - copy the file: "69-lvm-metad.rules" of the working version in "/lib/udev/rules.d/69-lvm-metad.rules" - and regenerate initram: "update-initramfs -u" repeating the test, the problem was solved (for me) Thanks Antonio---------------------------------------------------------------------------------------------------------------------------- --- /lib/udev/rules.d/69-lvm-metad.rules 2021-01-18 10:42:53.673808888 +0100 +++ /lib/udev/rules.d/69-lvm-metad.rules 2021-01-18 11:07:17.154831718 +0100 @@ -68,15 +68,17 @@ # For "systemd_background" mode, systemd takes care of this by activating # the lvm2-pvscan@.service only once. LABEL="next" -TEST!="/run/systemd/system", ACTION!="add", GOTO="lvm_end" -TEST=="/run/systemd/system", ACTION!="add|change", GOTO="lvm_end" +ACTION!="add|change", GOTO="lvm_end" LABEL="lvm_scan" ENV{SYSTEMD_READY}="1"----------------------------------------------------------------------------------------------------------------------------
The problem, which I had reported in January, still exists. It would be useful to apply the patch indicated above or similar (so as not to have to apply it to each update of the LVM2 package). Thanks Antonio
Dear Maintainer, I would like to remember that this problem is still present. Thanks, Antonio
Hi Alexander, For now I understand that, unlike the previous time, I can eliminate the stall condition with: vgchange -ay Perhaps an unavailable condition occurs, but not knowing how Lvconvert works can only hypothesize... I would like this bug to be closed, since it has been going on for a long time.
When the machine is rebooted and old thick snapshot merging is started, it may take some time. So there need to be something 'monitoring' progress of the merge and react when merge is finished. For this purpose the 'default' logic in lvm2 is 'lvmpolld' service - that should be present in the system, so lvchange activation command can connect lvmpolld service that would monitor progress of the merge. Once finished, lvmpolld will basically --refresh VG and update metadata and drop 'empty/merged' snapshot. There is also option to avoid using 'lvmpolld' and use the implicit monitoring with 'lvchange --background' that would need to be used with activation. As such there is most likely no bug on lvm2 here - but likely some configuration troubles. Also note lvmetad is 'gone' for 2.03 version of lvm2 - so there should be no connection with lvmetad udev rules.