-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pvscan: LVM2-2.02.186 didn't activate some LVs after bootup #24
Comments
I experienced the same behaviour. My System runs on Arch Linux too. On my system the Volumes for /home and /var can't be mounted. When my System drops to emergency shell, I'm able to activate and mount the corresponding LV's by hand. After mounting the missing volumes by hand the system will continue to boot after issueing the command: |
Same problem here |
Same here; the volume which /home is residing on doesn't get activated on boot and the system drops into emergency mode. Reverting the commit mentioned by X1aomu does seem to fix it. |
I had the same issue, and reverting helped. Interestingly on the laptop of my friend, with similar setup (LUKS + LVM) and up to date Arch the issue was not present. |
This Bug does not occur on systems with LVM on LUKS with one partition (tested) |
My setup is LVM with two disks and without LUKS so that LUKS may be irrelevant to this issue. It could be multiple PV/LV on different paritions/disks. |
I agree with that. I don't use LUKS, but an LVM with one VG including several LV's. One of the LV's is a Cached LV. The Cached Volume resides on a software RAID 5. |
There is a problem with the commit mentioned above ("pvscan: avoid redundant activation") that I'm working on fixing. We can't have pvscan creating the new temp files for incomplete VGs. This is a problem because pvscan initialization is mistakenly attempting to activate incomplete VGs when doing initialization, but that should be a separate fix (it's an older problem.) |
Activating incomplete VGs was the main problem to fix. There is a patch for that in RH bug 1748430 that can be tested. |
I think this fix should help: Could someone test this (using the stable-2.02 lvm branch) to confirm? |
@teigland Thanks for your hard work. The fix has been tested on my machine and it works fine. Hope it can be tested on more machines affected and the new release come out! |
Same issue here (I'm on Manjaro). A VG with multiple LVs on multiple disks. One LV is mirrored and doesn't get activated. The others are activated. Now using |
@teigland That fix seems to work for me as well. I had the bad luck of trying out lvmcache for the first time ever, which required adding another crypto device as a PV into my existing VG, which ended up triggering this bug. I initially resolved it by downgrading lvm after finding out about this issue right here, but now I've updated to the fixed version and can boot my system without issues. |
@PotcFdk , thanks. For me (Arch, LV over two encrypted partitions) it works now! |
Hello,
During the boot the system is stuck during pvscan. Here is my understanding:
I was able to manually activate thinpool, then lv and chroot my system to downgrade package 2.02.185 The main difference between my setup and other that reported the fix corrected the issue, is that I am using thinpool. I hope this help to solve the issue. |
That's how it (sd-encrypt) is supposed to work, at least.
Yes, for the first PV at least, so it tries to activate an incomplete VG, which leads us to your second step:
I assume it can't be activated due to the missing PV. So when you run 2.02.186-2 and try to boot, wait for the lvm2-pvscan unit to time out and then enter the emergency shell (by pressing return IIRC) and run
I think this would help to understand what's going on. Unless I'm misunderstanding your setup... Annotations: |
The patch isn't working for me either. Here is my setup:
On 2.02.186-1 I get the following errors after entering the password for
On 2.02.186-2:
|
I think proper solution is to add also second rd.luks... parameter on kernel command line to get both LUKS devices unlocked during boot. Or what is the reason not to do it this way? I don't know Archlinux internals good enough so maybe there's some limitation but I don't think this approach (partial activate VG, and add missing PVs later) is good practice. On one hand it could work ok, but in the same time I see many scenarios where this can fail terribly and in worst case also corrupt your filesystem beyond use. |
Sorry for the late answer. You are right, my issue was that I only mentioned the first device in kernel command. I added another parameters for the cryptdisk2 and it solves my issue. |
Looks like stale issue - we hade many major releases from that time - recently we also quite improved pscan logic for parsing. |
The issue seems to have disappeared in one of the previous releases. |
I experienced inactive LVs after bootup when using lvm2-2.02.186.
log for lvm2-2.02.185
log for lvm2-2.02.186
It seems to be caused by 8bcd482.
I guess that avoiding redundant activation accidently leads to skipping autoactivation after initramfs was load, which cause some of LVs be inactive. Though I currently don't know why not all of my LVs can be activated at once.
Some extra infomation was given in https://bbs.archlinux.org/viewtopic.php?id=248788
The text was updated successfully, but these errors were encountered: