NetBSD Problem Report #55383
From root@starwolf.com Sat Jun 13 06:03:27 2020
Return-Path: <root@starwolf.com>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 75F241A9219
for <gnats-bugs@gnats.NetBSD.org>; Sat, 13 Jun 2020 06:03:27 +0000 (UTC)
Message-Id: <20200613060325.CD53353@eddie.starwolf.com>
Date: Fri, 12 Jun 2020 23:03:25 -0700 (PDT)
From: greywolf@starwolf.com
Reply-To: greywolf@starwolf.com
To: gnats-bugs@NetBSD.org
Subject: lvm is called before raidframe
X-Send-Pr-Version: 3.95
>Number: 55383
>Category: bin
>Synopsis: lvm is called before raidframe
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Jun 13 06:05:00 +0000 2020
>Last-Modified: Sat Jun 13 08:45:02 +0000 2020
>Originator: The Grey Wolf
>Release: NetBSD 9.99.63
>Organization:
Star Wolf Innovations
>Environment:
System: NetBSD eddie.starwolf.com 9.99.63 NetBSD 9.99.63 (GENERIC) #1: Thu May 28 01:02:22 PDT 2020 greywolf@eddie.starwolf.com:/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
I have several raid volumes which do not autoconfigure for
whatever reason, so I need to start raidframe. Might have had
something to do with having higher-number raid volumes as sub-raids
of the lower number (raid2 == raid20 + raid21)? I don't know.
That, in and of itself, is an annoyance I will probably just have
to live with.
-
When my system restarted, the lvm rc script ran _before_ raidframe
did. I would expect that more people have LVM atop RAID than the
converse, so I patched /etc/rc.d/lvm to require raidframe before
attempting to configure the volume groups.
>How-To-Repeat:
* set up a raid device (raid 1 + 0: 2 mirrored pairs, striped)
* set up config files for them in /etc. Set autoconfigure to 'yes'.
* Start slicing the RAID up into PVs, and allocate VGs and volumes.
* enable lvm and raidframe in /etc/rc.conf.
* reboot the machine.
* If your raid devices come up fine, well, this exercise is
pointless. I tried...(try again with autoconfigure to 'no').
* Notice that lvm runs before raidframe.
>Fix:
diff -u etc/rc.d/lvm.orig etc/rc.d/lvm
--- lvm.orig 2020-06-12 22:51:07.234896770 -0700
+++ lvm 2020-06-12 22:51:15.916870141 -0700
@@ -4,7 +4,7 @@
#
# PROVIDE: lvm
-# REQUIRE: root
+# REQUIRE: root raidframe
# BEFORE: DISKS
$_rc_subr_loaded . /etc/rc.subr
>Audit-Trail:
From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: bin/55383: lvm is called before raidframe
Date: Sat, 13 Jun 2020 08:39:58 -0000 (UTC)
greywolf@starwolf.com writes:
> I have several raid volumes which do not autoconfigure for
> whatever reason, so I need to start raidframe. Might have had
> something to do with having higher-number raid volumes as sub-raids
> of the lower number (raid2 == raid20 + raid21)? I don't know.
Hierarchical RAID sets don't autoconfigure. Add autocnfig time, the driver
only searches disk partitions (and wedges) of type raid and assembles raid
sets from these. For hierarchical raids that process would need to recurse.
Most useful would be a mechanism that incrementally builds raid sets
and scans disks for raid compoments when they attach (like we scan
for wedges now). That would support hierarchical raids and also
support hot-plug disks. If that's not needed for the root, it could
be implemented as a devpubd hook. Of course devpubd should then run
much earlier...
--
--
Michael van Elst
Internet: mlelstv@serpens.de
"A potential Snark may lurk in every tree."
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.