LVM Cache Layer Recovery
2/1/25Less than 1 minute
Refer: https://serverfault.com/questions/932247/how-to-recover-a-cached-lvm-with-cache-on-ram-disk
Insert a new disk, or create a loop device using memory (if it's not large enough, you're out of luck)
After lvm, execute the following to remove cache
pvs
pvcreate --norestore --uuid <uuid_of_pv> /dev/loop0
lvchange -a y vg
lvconvert --uncache vg/lv- Remove the disk from vg, then delete the pv created for recovery, then
lvchange -ay lvroot - Repair the filesystem
fsck.ext4 /dev/mapper/vg0-lvroot - ^D to exit shell and continue booting, should succeed