30 seconds boot delay when root fs is on lvm
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lvm2 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
On my system the root filesystem is located on a logical volume. I have constant boot delay of 30 seconds. My current conclusion is that this problem exists due to lvm performing the initramfs-tools local-top initialization incorrectly.
According to initramfs-tools(8):
local-top OR nfs-top After these scripts have been executed, the root device node is expected to be present (local) or the network interface is expected to be usable (NFS).
But what /usr/share/
This has a (minimum) timeout of 30 seconds configured. This timeout is exceeded since nothing will make the root volume device to be created. Then later (I guess in local-block) the root volume device is created (since the pv is available).
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: lvm2 2.02.176-4.1ubuntu3
ProcVersionSign
Uname: Linux 4.15.0-42-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.5
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sat Dec 8 13:52:06 2018
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=de_AT.UTF-8
SHELL=/bin/bash
SourcePackage: lvm2
UpgradeStatus: No upgrade log present (probably fresh install)
A the moment I can see following solutions:
(1) initramfs- tools/scripts/ local-top/ lvm2 a while loop which executes the "lvchange" command repeatedly until the root LV appears
Make the lvchange_activate function in /usr/share/
(2) rules.d/ 69-lvm- metad.rules the line 96 PV_GONE} =="1", RUN+="/ bin/systemd- run /sbin/lvm pvscan --cache $major:$minor --activate ay", GOTO="lvm_end"
Utilize udevd to create the LV devices while wait-for-root is waiting for the root LV to appear. A hack for doing so is to replace in /lib/udev/
ACTION!="remove", ENV{LVM_
with
ACTION!="remove", RUN+="/sbin/lvm pvscan --cache $major:$minor --activate ay"