You are not logged in.

#1 2021-07-12 22:12:25

DDDD
Member
Registered: 2021-07-12
Posts: 2

LVM issues.

Hello. I've setup Arch with LVM on luks. I created a snapshot using lvcreate -L 20GB -s -n root_snap /dev/volgroup0/lv_root. I later used pacman -Syu to update the system and a few days later i merged the snapshot back to revert the changes.
I got the root/swap/home in the encrypted lvm and boot in its own partition. When i rebooted the system after using lvconvert --mege /dev/volgroup0/root-snap i couldnt boot the system "Failed to load kernel modules", uname -r showed a later kernel version then what i could see in pacman -Q

https://i.imgur.com/YF7SJLH.png

If i run lvs i can only see 3 logical partitions and not the snapshot, just like it should be.
How can i fix this and why is merging creating this conflict? Is it because i have boot on its own partition and how can i get rid of all the extra mounts i see in lsblk?

Thank you!

*Edit an extra reboot solved the problem with the extra mount points in lsblk, but i still don't know why im having these issues while merging a snapshot. Appriciate any help.

moderator edit -- replaced oversized image with link.
Pasting pictures and code

Last edited by 2ManyDogs (2022-01-05 13:00:52)

Offline

#2 2021-07-12 22:25:19

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: LVM issues.

Please replace the oversize image with actual text output, in code tags: https://wiki.archlinux.org/index.php/Co … s_and_code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2021-07-14 12:46:57

DDDD
Member
Registered: 2021-07-12
Posts: 2

Re: LVM issues.

jasonwryan wrote:

Please replace the oversize image with actual text output, in code tags: https://wiki.archlinux.org/index.php/Co … s_and_code

Sorry, i no longer have access to the output as that part of the issue resolved itself after restarting a second time.
Won't post a picture next time im in need of assistance.

I do still however wonder if there is a way to also backup the boot partition as the lvm snapshot does not seem to do this.
So if i do decide to merge this is just gonna keep happening if there is a newer kernel available as that is not going to get merged back.

Offline

#4 2022-01-05 12:37:32

TKone7
Member
Registered: 2022-01-05
Posts: 7

Re: LVM issues.

Hey DDDD, I had the exact same issue as you:
After restoring a snapshot from an older linux kernel version I was unable to boot since the version of the modules (restored > older version) do not match with the kernel I am running (not affected cause on /boot > newer version).

Instead of installing the latest linux kernel (pacman -S linux) as you described, I was able to install the correct older kernel version (effectively restore the system state) as follows:

pacman -U /var/cache/pacman/pkg/linux-x-x86_64.pkg.tar.zst

(x stands for the older kernel version which is used by the restored snapshot).

In order to do this, I had to boot into an installation media and mount the root file system as well as the boot partition, then arch-chroot into the root file system and run the above command.

I now wonder if there is a way how to automate this. Based on this article I thought one could create a systemd.target that merges the snapshot and adjusts the kernel version by installing it again like this:

pacman -U $(ls /var/cache/pacman/pkg/$(pacman -Q linux | sed 's/ /-/')*.zst)

However, this creates a tail-biting issue. I cannot run pacman since I am not able to boot.

If someone more experienced could help me out or give some advice, this would be much appreciated.

Best regards

Offline

Board footer

Powered by FluxBB