[linux-lvm] LVM VG is not activated during system boot

MegaBrutal megabrutal at gmail.com
Tue Nov 25 17:00:06 UTC 2014

No, I don't have such kernel option.

But previously it was working without that. Aren't all volume groups
supposed to auto-activate, unless I set otherwise in lvm.conf?

I'll try this kernel option, however.

I have a "rootdelay" set to make initrd wait longer for the boot
device. With previous kernels, it worked, but now no matter how long I
set this value, the VG never activates. It only activates when I
manually activate it from the initrd prompt.

2014-11-25 17:15 GMT+01:00 Daniel Savard <daniel.savard at gmail.com>:
> What are your kernel boot options? Do you specify the VGs you wish to
> be activated at boot time there?
> I have one entry like this one for each VG: rd.lvm.vg=vgname
> -----------------
> Daniel Savard
> 2014-11-25 10:54 GMT-05:00 MegaBrutal <megabrutal at gmail.com>:
>> 2014-11-25 15:33 GMT+01:00 Peter Rajnoha <prajnoha at redhat.com>:
>>> On 11/25/2014 03:19 PM, MegaBrutal wrote:
>>>> 2014-11-25 9:01 GMT+01:00 Peter Rajnoha <prajnoha at redhat.com
>>>> <mailto:prajnoha at redhat.com>>:
>>>>     What's the exact lvm2 version used (lvm --version)?
>>>> root at vmhost:~# lvm version
>>>>   LVM version:     2.02.98(2) (2012-10-15)
>>>>   Library version: 1.02.77 (2012-10-15)
>>>>   Driver version:  4.27.0
>>>>     Is lvmetad enabled in your setup? (global/use_lvmetad=1 setting
>>>>     in lvm.conf and lvmetad daemon running?)
>>>>     use_lvmetad = 0
>>>> No such daemon is running.
>>> This means that LV autoactivation is not enabled in that case too
>>> (as it depends on lvmetad to be active) and there must a direct
>>> call for the activation (vgchange/lvchange -ay/-aay)
>>> However, most distributions do not use lvmetad in initrd anyway
>>> (the only I know of at the moment is Arch Linux). As such, I think
>>> this is a problem with distribution's initrd that is not waiting
>>> properly for all PVs to show up and it calls LV activation prematurely.
>>> I'd report your issue to your distribution's initrd component as each
>>> distribution uses its own initrd scheme (I could help you with Fedora's
>>> dracut initrd, but I don't see into Debian's/Ubuntu initrd scheme).
>>>>     Does it activate when you run vgchange -aay vmdata-vg vmhost-vg
>>>>     directly on the busybox cmd line?
>>>> The exact command I used to use in the BusyBox prompt is
>>>> lvm vgchange -ay vmhost-vg
>>>> Or, if I remember correctly, it activates simply by
>>>> lvm vgchange -ay
>>>> as well.
>>>> Then I exit the BusyBox prompt, and the boot process continues correctly.
>>>> My root FS is in vmhost-vg, and I have no idea why it doesn't come up
>>>> automatically.
>>> Yeah, it all points to premature vgchange call in initrd's script.
>>> Please, report this in your distribution's bug tracking system if
>>> possible.
>> Thanks for the advice!
>> I opened a Launchpad report here:
>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1396213

More information about the linux-lvm mailing list