X-Original-To: alpine-user@mail.alpinelinux.org Delivered-To: alpine-user@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 4A8DEDC09FF for ; Mon, 11 Jan 2016 10:02:39 +0000 (UTC) Received: from newmail.tetrasec.net (unknown [74.117.189.116]) by mail.alpinelinux.org (Postfix) with ESMTP id 02EAFDC04E3 for ; Mon, 11 Jan 2016 10:02:38 +0000 (UTC) Received: from ncopa-desktop.alpinelinux.org (103.63.200.37.customer.cdi.no [37.200.63.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: n@tanael.org) by newmail.tetrasec.net (Postfix) with ESMTPSA id E74AC5A09E2; Mon, 11 Jan 2016 10:02:37 +0000 (GMT) Date: Mon, 11 Jan 2016 11:02:33 +0100 From: Natanael Copa To: Dieter Bloms Cc: alpine-user@lists.alpinelinux.org Subject: Re: [alpine-user] alpinelinux 3.3.1 can not boot, when root is on lvm, which is on raid1 Message-ID: <20160111110233.3a20396d@ncopa-desktop.alpinelinux.org> In-Reply-To: <20160111085919.45eaa3cc@ncopa-desktop.alpinelinux.org> References: <20160108205634.GA6702@bloms.de> <20160111085919.45eaa3cc@ncopa-desktop.alpinelinux.org> X-Mailer: Claws Mail 3.13.1 (GTK+ 2.24.28; x86_64-alpine-linux-musl) X-Mailinglist: alpine-user Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP On Mon, 11 Jan 2016 08:59:19 +0100 Natanael Copa wrote: > On Fri, 8 Jan 2016 21:56:34 +0100 > Dieter Bloms 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 > acceptable. > > 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. -nc --- Unsubscribe: alpine-user+unsubscribe@lists.alpinelinux.org Help: alpine-user+help@lists.alpinelinux.org ---