You are not logged in.

#51 2013-02-14 10:17:14

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: Changes to LVM2 and udev break LVM2 on LUKS?

@tranqil: The rootdelay=0 is killing you. Remove it.

Offline

#52 2013-02-14 10:21:48

tranqil
Member
Registered: 2012-09-06
Posts: 28

Re: Changes to LVM2 and udev break LVM2 on LUKS?

Are you sure? In my backup / fallback kernel configuration, I have set the delay to 5 seconds, but on the default kernel. I have always an delay of 0, and got no problems (till now). Maybe I'll try to boot with an delay. But I'm not so sure if this will fix the problem.

Last edited by tranqil (2013-02-14 10:21:59)

Offline

#53 2013-02-14 10:46:04

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: Changes to LVM2 and udev break LVM2 on LUKS?

tranqil wrote:

Are you sure? In my backup / fallback kernel configuration, I have set the delay to 5 seconds, but on the default kernel. I have always an delay of 0, and got no problems (till now). Maybe I'll try to boot with an delay. But I'm not so sure if this will fix the problem.

rootdelay=0 means that initramfs never waits for a root device and fails immediately if it doesn't exist. This is a bad idea. Naturally, the LVM assembly takes more than 0 seconds to complete. Why do you use options without knowing what they do?

Offline

#54 2013-02-14 10:50:48

tranqil
Member
Registered: 2012-09-06
Posts: 28

Re: Changes to LVM2 and udev break LVM2 on LUKS?

I know absolutely what this option does. But it slows down my boot process! This is the reason why I have it _only_ in my backup/fallback kernel configurations. Please read before start argueing. And as I said, I'll try your suggestion and add an delay to it, on my next reboot.

Edit: Ok you were right! With an root_delay of "1" I'm not going to be dropped into the shell and see an error of the "unused" encryption hook, which trys to decrypt my root partition <-- this is ok. Maybe I have to include all dmcrypt binaries in my smartcard hook, this would be smarter, so I don't need this dependency. smile [However, this warning were not shown prior to the lvm changes] Many thanks for giving me the right direction!

But for me it is still uncertain, why lvm needs now more time to find the right device, I never had any problems with a root_delay of '0'. Only if I try to boot from SD-Card or something else I need to set the delay to <5.

Last edited by tranqil (2013-02-14 11:11:44)

Offline

#55 2013-02-14 11:56:45

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: Changes to LVM2 and udev break LVM2 on LUKS?

tranqil wrote:

I know absolutely what this option does. But it slows down my boot process!

This option does NOT slow down your boot process. If it does, then you are either misconfigured or hit a bug.

Offline

#56 2013-02-14 12:55:34

tranqil
Member
Registered: 2012-09-06
Posts: 28

Re: Changes to LVM2 and udev break LVM2 on LUKS?

If I add more then 5 seconds to the rootdelay kernel parameters then my boot time is increased by ~3 seconds. Also the Archlinux wiki gives this hint.

Offline

#57 2013-02-14 13:08:03

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: Changes to LVM2 and udev break LVM2 on LUKS?

tranqil wrote:

If I add more then 5 seconds to the rootdelay kernel parameters then my boot time is increased by ~3 seconds. Also the Archlinux wiki gives this hint.

First of all, the wiki is wrong here (the wiki is mostly written by people who only guess things, apparently). It is entirely impossible that rootdelay has a negative effect on your boot time unless you use broken mkinitcpio hooks.

Offline

#58 2013-02-14 13:30:01

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: Changes to LVM2 and udev break LVM2 on LUKS?

Everyone who is still having trouble, try changing the global filter line in /etc/lvm/lvm.conf from

# global_filter = []

to

global_filter = [ "r|^/dev/fd[0-9]$|", "r|^/dev/sr[0-9]$|" ]

Then run mkinitcpio -p linux again.

Last edited by brain0 (2013-02-14 13:30:19)

Offline

#59 2013-02-14 14:14:25

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,092
Website

Re: Changes to LVM2 and udev break LVM2 on LUKS?

tranqil wrote:

Also the Archlinux wiki gives this hint.

Not anymore it doesn't. This was really bad advice. I suggest you take a look at poll_device if you'd like to dispute this. Initramfs hooks are wrong if they use rootdelay explicitly. They should only ever call poll_device which returns early when the device shows up before the timeout.

Last edited by falconindy (2013-02-14 14:14:55)

Offline

#60 2013-02-14 15:11:45

tranqil
Member
Registered: 2012-09-06
Posts: 28

Re: Changes to LVM2 and udev break LVM2 on LUKS?

Thank you for the clarification, I tried it today without this kernel parameter and there isn't a noticeable delay anymore. But I'm sure somedays there was an!

I also included the dmcrypt binaries to my smartcard hook so I could exclude the encryption hook from mkinitcpio.conf and no longer got this error message from it.
Thank you guys for the help!

Last edited by tranqil (2013-02-14 15:14:07)

Offline

#61 2013-02-14 15:15:41

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: Changes to LVM2 and udev break LVM2 on LUKS?

tranqil wrote:

Thank you for the clarification, I tried it today without this kernel parameter and there isn't a noticeable delay anymore. But I'm sure somedays there was an!

The first changes in this direction date back to 2009.

Offline

#62 2013-02-14 15:37:44

tranqil
Member
Registered: 2012-09-06
Posts: 28

Re: Changes to LVM2 and udev break LVM2 on LUKS?

Looks like I'm not up to date, but like I said, never had problems with rootdelay=0 before. Anyway I changed it and have no delay in the boot process anymore so I'm lucky with it.

Last edited by tranqil (2013-02-14 17:57:24)

Offline

#63 2013-02-14 15:46:46

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: Changes to LVM2 and udev break LVM2 on LUKS?

tranqil wrote:

Looks like I'm not up to date, but like I said, never had problems with rootdelay=0 before. Anyway I changed it and have no delay anymore so I'm lucky with it.

The whole point of the changes here is to take any ordering out of the boot process. Instead of having a fixed set of command to run in order (assemble raid, assemble lvm, mount), we now simply fire up udev and wait until our root device shows up. The old method had the problem that we often called vgchange before the underlying devices were there and thus failed to boot - and since we couldn't predict which devices to wait for, we'd end up with a certain percentage of systems that didn't boot reliably with LVM.

Udev assembles devices as they appear, and thus you can arbitrarily stack them on top of each other without complex assembly logic in our own scripts. This is supposed to be much more robust (and it actually is more robust for everyone but the few people in this thread). Part of the result is that once we fired up udev, it may take any amount of time until the device shows up, and we don't know when that will be. The rootdelay=0 setting assumes that everything is assembled immediately, which is true if there is nothing to do - but the more stuff we move into udev, the longer this delay needs to be. I guess the usual time between starting to wait for the device and its appearance is about 0.2 seconds (still more than 0).

One exception to all this is encryption: We need to query a passphrase, thus we still wait for the physical volume, open it and continue.

Last edited by brain0 (2013-02-14 15:48:08)

Offline

#64 2013-02-14 19:14:15

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,616
Website

Re: Changes to LVM2 and udev break LVM2 on LUKS?

brain0 wrote:

Everyone who is still having trouble, try changing the global filter line in /etc/lvm/lvm.conf from

# global_filter = []

to

global_filter = [ "r|^/dev/fd[0-9]$|", "r|^/dev/sr[0-9]$|" ]

Then run mkinitcpio -p linux again.

This seems to have done the trick for me.

Thanks!

Last edited by Xyne (2013-02-14 19:14:32)

Online

#65 2013-02-15 07:55:07

cs
Member
Registered: 2013-02-13
Posts: 9

Re: Changes to LVM2 and udev break LVM2 on LUKS?

brain0 wrote:

Everyone who is still having trouble, try changing the global filter line in /etc/lvm/lvm.conf from

# global_filter = []

to

global_filter = [ "r|^/dev/fd[0-9]$|", "r|^/dev/sr[0-9]$|" ]

Then run mkinitcpio -p linux again.

That did not work for me...

Offline

#66 2013-02-15 07:57:50

louis058
Member
Registered: 2010-11-12
Posts: 29

Re: Changes to LVM2 and udev break LVM2 on LUKS?

Sorry, it seems my error where boot was stopping at the lvm2 hook was just me being unknowledgable. I only realized when brain0 suggested uploading the initramfs img files. It occured to me that if a problem had occured in the initramfs files, it may be because I hadn't copied over the initramfs files from /boot into the EFI partition after running mkinitcpio.

It then occured to me that systemd commands had never worked for me in chroot, and I had set up a systemd task to automatically sync the initramfs files in the /boot folder and the EFI folder. Of course, after copying the files over manually, my system worked again.

I wish I knew more about systemd, and chroot, so that things like this would just occur to me automatically.

Offline

#67 2013-02-15 09:29:57

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: Changes to LVM2 and udev break LVM2 on LUKS?

louis058 wrote:

Sorry, it seems my error where boot was stopping at the lvm2 hook was just me being unknowledgable. I only realized when brain0 suggested uploading the initramfs img files. It occured to me that if a problem had occured in the initramfs files, it may be because I hadn't copied over the initramfs files from /boot into the EFI partition after running mkinitcpio.

Protip: Edit /etc/mkinitcpio.d/linux.preset and change the path to the initramfs. (This still leaves the problem of copying the kernel though.)

Offline

#68 2013-02-15 09:32:14

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: Changes to LVM2 and udev break LVM2 on LUKS?

cs wrote:
brain0 wrote:

Everyone who is still having trouble, try changing the global filter line in /etc/lvm/lvm.conf from

# global_filter = []

to

global_filter = [ "r|^/dev/fd[0-9]$|", "r|^/dev/sr[0-9]$|" ]

Then run mkinitcpio -p linux again.

That did not work for me...

At least for some, it solves the problem. I'll be working on patching 'pvscan' to fix this.

In the meantime, we need to fix your problem, too. Can you run 'ps' in the recovery shell and post what it says? (Ignore all processes that are enclosed in [square brackets].)

Offline

#69 2013-02-16 10:12:47

Ibex
Member
Registered: 2006-03-02
Posts: 127

Re: Changes to LVM2 and udev break LVM2 on LUKS?

I got a similar issue this morning, where I was stuk at LVM at boot. I don't have raid or luks, but since I was stuck as well, google pointed me to this topic.

In my particular case, the issue was that my kernel and initramfs were generated in /boot, but were not copied to my EFI folders. I copied those to the correct location (after re-running mkinitcpio -p linux) and my laptop booted again: https://wiki.archlinux.org/index.php/UE … up_EFISTUB

Hope somebody here can make use of the above fix.

Offline

#70 2013-02-16 16:42:21

dsoul
Member
Registered: 2011-03-26
Posts: 3

Re: Changes to LVM2 and udev break LVM2 on LUKS?

I had problems with booting with root on lvm too after arch change to lvmetad. I seems that this due to poor quality of lvmetad in lvm 2.02.98, after building lvm grom git/master everything works ok.

Offline

#71 2013-02-17 02:23:46

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Changes to LVM2 and udev break LVM2 on LUKS?

After the update I thought "I don't know what is going with all these people's machines, as mine is working fine." Then mysteriously after the most recent kernel update it happened to me too. Thank god for this thread and brain0. It happened this morning. I went out of town, and wwhen I got there (here) I was able to reference this thread and the change to global_filter to ignore sr• and fd• did the trick.

I was able to make this fox without booting the live media also by using "modprobe.blacklist=floppy".  Again, thanks brain0!

Offline

#72 2013-02-18 00:33:39

dbourgeo
Member
Registered: 2012-11-26
Posts: 28

Re: Changes to LVM2 and udev break LVM2 on LUKS?

I fell to this problem after I never noticed I needed to run mkinitcpio -p linux  when I upgraded linux, lvm2, and device-mapper along with everything else via pacman -Syu.

I then downgraded lvm2 and device-mapper, and downgraded linux to my previous kernel (3.7.8-1). I still can't get my computer to boot. I never got dropped to a shell in my previous situation (before downgrading), and it is the same now. Everything stops after lvm2 appears, no panic notice, nothing.  I did run mkinitcpio again after all the downgrades.

Other than the lvm partitions I use, there is no encryption, and everything is stock. My lvm.conf seems good, there was only the one line changed, and my hooks seem fine, the same ones that used to work.

Is there something else I need to downgrade?

Offline

#73 2013-02-18 02:11:33

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: Changes to LVM2 and udev break LVM2 on LUKS?

Isn't that the current kernel? Did you downgrade to 3.7.7-* or something else?

Did you try the fixes suggested in this thread?


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#74 2013-02-18 02:36:48

dbourgeo
Member
Registered: 2012-11-26
Posts: 28

Re: Changes to LVM2 and udev break LVM2 on LUKS?

Yes, sorry, it was 3.7 something (inaccessible now), I remember the cache file was dated Jan 22.

I also tried rolling back glibc but soon got entangled in dependencies. Interestingly, I reupgraded and got all the appropriate output, telling me there was an error in my mkinitcpio process. So I ran it again, after editing lvm.conf to make sure lvmetab=1. This is what I should have done the first time. I don't use EFI. I tried the floppy fix in lvm.conf after reupgrading. Of course, these efforts didn't fix anything. My boot screen for the recovery mode entry (grub) looks like:

Loading Linux core repo kernel..
Loading initial ramdisk.
early console in decompress_kernel

Decompressing Linux... Parsing ELF... done.
Booting the kernel.
running early hook [udev]
running hook [udev]
Triggering uevents.
running hook [lvm2]
Activating logical volumes... [my HD makes all the usual noises when this happens]
  12 logical volume(s) in volume group "lvmvolume" now active [then it stops and hangs]

Since I am a bit of a beginner, is there something I need to get it to drop to console?

Addition: the kernel doesn't seem to be panicked, if I stick in a USB thumb drive, that will get reported on screen. I can do this over and over again, getting the usual lines you see when a USB device gets discovered.

Last edited by dbourgeo (2013-02-21 21:00:07)

Offline

#75 2013-02-18 02:50:13

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Changes to LVM2 and udev break LVM2 on LUKS?

How long are you waiting? It is interesting that you lvm is being marked as active, as the absence of this is what was making my system hang. So I am not sure that waiting is actually going to help, but being dropped into the initramfs' shell took a bit for me.

Offline

Board footer

Powered by FluxBB