NetBSD Problem Report #56369
From martin@duskware.de Thu Aug 19 18:37:49 2021
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_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 085531A921F
for <gnats-bugs@gnats.NetBSD.org>; Thu, 19 Aug 2021 18:37:49 +0000 (UTC)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: raid does not autoconfig root and configures two times
X-Send-Pr-Version: 3.95
>Number: 56369
>Category: kern
>Synopsis: raid does not autoconfig root and configures two times
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: oster
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 19 18:40:00 +0000 2021
>Closed-Date: Sun Aug 29 08:35:11 +0000 2021
>Last-Modified: Sun Aug 29 08:35:11 +0000 2021
>Originator: Martin Husemann
>Release: NetBSD 9.99.88
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD sunny-weather.duskware.de 9.99.88 NetBSD 9.99.88 (SUNNY.MP) #1: Thu Aug 19 19:56:48 CEST 2021 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/sparc64/compile/SUNNY.MP sparc64
Architecture: sparc64
Machine: sparc64
>Description:
I just updated two machines booting from raid 1 from older installations
and now am unexpectedly asked for the root device on both.
A 9.88.80 kernel did boot w/o prompt.
Also note that the raid cloned itself, raid1 is a fake.
...
[ 8.2800271] raid0: RAID Level 1
[ 8.3200261] raid0: Components: /dev/sd0a /dev/sd1a
[ 8.3800261] raid0: Total Sectors: 286749408 (140014 MB)
[ 8.5100271] raid1: RAID Level 1
[ 8.5500261] raid1: Components: /dev/sd0c /dev/sd1c
[ 8.6000261] raid1: Total Sectors: 286749408 (140014 MB)
[ 8.7700271] root device (default sd0a): raid0a
[ 31.8900271] dump device (default raid0b):
[ 33.5800261] file system (default generic):
[ 34.2800261] root on raid0a dumps on raid0b
[ 34.3700271] root file system type: ffs
[ 34.4200261] kern.module.path=/stand/sparc64/9.99.88/modules
[ 34.5000281] init path (default /sbin/init):
[ 35.5700261] init: trying /sbin/init
Thu Aug 19 20:01:52 CEST 2021
...
Raidctl shows:
[/] root@sunny-weather # raidctl -s raid0
Components:
/dev/sd0a: optimal
/dev/sd1a: optimal
No spares.
Component label for /dev/sd0a:
Row: 0, Column: 0, Num Rows: 1, Num Columns: 2
Version: 2, Serial Number: 96285633, Mod Counter: 1848
Clean: No, Status: 0
sectPerSU: 32, SUsPerPU: 1, SUsPerRU: 1
Queue size: 100, blocksize: 512, numBlocks: 286749408
RAID Level: 1
Autoconfig: Yes
Root partition: Force
Last configured as: raid0
Component label for /dev/sd1a:
Row: 0, Column: 1, Num Rows: 1, Num Columns: 2
Version: 2, Serial Number: 96285633, Mod Counter: 1848
Clean: No, Status: 0
sectPerSU: 32, SUsPerPU: 1, SUsPerRU: 1
Queue size: 100, blocksize: 512, numBlocks: 286749408
RAID Level: 1
Autoconfig: Yes
Root partition: Force
Last configured as: raid0
Parity status: clean
Reconstruction is 100% complete.
Parity Re-write is 100% complete.
Copyback is 100% complete.
Disklabel for both disks is identical:
3 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 287132440 0 RAID # (Cyl. 0 - 47983*)
c: 287132440 0 unused 0 0 # (Cyl. 0 - 47983*)
>How-To-Repeat:
s.a.
>Fix:
n/a
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->oster
Responsible-Changed-By: oster@NetBSD.org
Responsible-Changed-When: Thu, 26 Aug 2021 20:11:01 +0000
Responsible-Changed-Why:
Take.
State-Changed-From-To: open->feedback
State-Changed-By: oster@NetBSD.org
State-Changed-When: Sat, 28 Aug 2021 16:03:34 +0000
State-Changed-Why:
At least the 'configure two times' is fixed. This will likely (hopefully) also fix the 'does not autoconfig root' part of this PR as well.
From: "Greg Oster" <oster@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/56369 CVS commit: src/sys/dev/raidframe
Date: Sat, 28 Aug 2021 16:00:52 +0000
Module Name: src
Committed By: oster
Date: Sat Aug 28 16:00:52 UTC 2021
Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c
Log Message:
If there is a FS_RAID partition on a disk, then we shouldn't look at
the raw partition. In particular, we now need to account for the case
where an existing FS_RAID partition is now open because it is in use.
If that is the case, we don't look at the raw partition.
Addresses PR kern/56369.
To generate a diff of this commit:
cvs rdiff -u -r1.399 -r1.400 src/sys/dev/raidframe/rf_netbsdkintf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: feedback->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Sun, 29 Aug 2021 08:35:11 +0000
State-Changed-Why:
Fixed, thanks!
>Unformatted:
(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.