LVM merging from snapshots don't work.

I have two logical volume - one is for the entire system and one is a snapshot that I have created if I want to revert things if an upgrade breaks them.

This is the output of *lvs*

 LV             VG       Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  before_upgrade vgfedora swi-a-s--- 30.00g      fedora 22.84                                  
  fedora         vgfedora owi-aos--- 50.00g   

Now I perform my upgrade by running *sudo dnf upgrade -y*, the upgrade completes without any problems.

Now if I want to revert back to my old system state that is the snapshot *before_upgrade*, I boot into a Live Fedora 31 environment and open my encrypted partition using

$ cryptsetup open /dev/sda3 dm_crypt

And I issue the command:

$ lvconvert --merge /dev/vgfedora/before_upgrade

This works as expected until it hits 100%:

vgfedora/fedora: Merged: 99.59%
vgfedora/fedora: Merged: 99.90%
vgfedora/fedora: Merged: 100.00%

It hangs completely.

It has been almost 3 hours and I have not seen the status change.

Hitting *Ctrl + C* now will produce the following output:

^C  Interrupted...
  Giving up waiting for lock.
  Can't get lock for vgfedora
  Can't reread VG for vgfedora/fedora error flags 2

If I reboot the restoration has not been done and the logical volume *before_upgrade* has vanished.

Here is my layout:

lsblk -f

NAME FSTYPE LABEL UUID                                   FSAVAIL FSUSE% MOUNTPOINT
sda                                                                    
├─sda1
│    ext4         2ea20bf9-ee56-490f-b12d-bd8d34e2fa3f    694.3M    22% /boot
└─sda2
     crypto       b09a1a64-9b05-4c23-b048-1eacd03cf60b                  
  └─luks-b09a1a64-9b05-4c23-b048-1eacd03cf60b
     LVM2_m       B0i0fa-Yxme-Yntt-9uwM-VpFU-3xSB-K774pD                
    ├─vgfedora-fedora-real
    │                                                                    
    │ ├─vgfedora-fedora
    │ │  ext4   root  1176ad7d-d3e7-4062-b799-8e2b761f10af     39.5G    14% /
    │ └─vgfedora-before_upgrade
    │    ext4   root  1176ad7d-d3e7-4062-b799-8e2b761f10af                  
    └─vgfedora-before_upgrade-cow
                                                                         
      └─vgfedora-before_upgrade
         ext4   root  1176ad7d-d3e7-4062-b799-8e2b761f10af                 

What is going on ?

Interestingly I have tried the same thing in other distributions like Ubuntu and this works. So seems like a Fedora specific issue.

Let me know if any other information is required, like any other log files.

Thanks.

--
Regards,
Sreyan Chakravarty