Re: [alpine-user] alpinelinux 3.3.1 can not boot, when root is on lvm, which is on raid1
On Mon, 11 Jan 2016 08:59:19 +0100
Natanael Copa <ncopa_at_alpinelinux.org> wrote:
> On Fri, 8 Jan 2016 21:56:34 +0100
> Dieter Bloms <alpinelinux.org_at_bloms.de> wrote:
> > Hi,
> > I installed alpinelinux 3.3.1 with manual disc mode.
> > My root is a logical volume in a volume group on a raid1 system.
> > During boot the raid is activated, but the logical volumes are not.
> > So I have to activate it manually and mount it to /sysroot.
> > After that I can boot into alpinelinux.
> > Is it a known problem, that lvm on a raid is not activated in the
> > initramfs during boot ?
> It is a known problem. I have the same on my workstation. Sometimes it
> works and sometimes it fails so I think it is a timing issue.
> Today I looked at it a bit and it seems that /sbin/lvm is never
> executed from initramfs. It means that the nlplug-findfs times out
> before it gets the hotplug event for mdadm devices.
> I think we have a few options for fixing it:
> 1) when mdadm is run, make it wait til all mdadm devices are run before
> exit. I don't know if this is possible, but nlplug-finds will not
> exit til all forked children has exited. This means that mdadm
> executes, initalizes the raid devices, and exits long before the
> kernel generates the uevent for the raid device. If we could make
> mdadm not exit til the uevent is generated, then we should be fine.
> I don't know if there is any option for that. (probably not)
> 2) When mdadm is started, increase the default nlplug-findfs timeout
> (250ms) so kernel gets enough time to generate the raid device
> uevent before nlplug-findfs times out. We could increase it with 1
> sec for example? The problem is that I don't know what is a good
> value since it may depend on the hardware. It will also make boot
> slower when you boot to tmpfs root but does not have any apkovl. I
> doubt there will ever exist any such setup so the slowdown here is
> 3) When boot option `root=...` is specified, increase the default
> nlplug-findfs timeout (250ms) to something significantly longer.
> Maybe 2 seconds? 5 seconds? If we actually timeout, it means that we
> will failed to find the rootfs and the boot will fail. So it makes
> sense to increase the timeout for making it not give up that fast.
I tested this. it didnt help. must be mdadm that mdadm delete/recreate
the /dev/md* device node so that when the uevent trigger happens,
the /dev/md* device node temporarily does not exist.
I think we might need block event handling while mdadm executes. We do
the same for cryptsetup.
Received on Mon Jan 11 2016 - 11:02:33 UTC