NetBSD Problem Report #26741
Received: (qmail 28060 invoked by uid 605); 23 Aug 2004 12:23:29 -0000
Message-Id: <200408231223.i7NCNMkh003483@colwyn.zhadum.de>
Date: Mon, 23 Aug 2004 14:23:22 +0200 (CEST)
From: Matthias Scheler <tron@zhadum.de>
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: tron@zhadum.de
To: gnats-bugs@gnats.NetBSD.org
Subject: "raidctl -S" doesn't always work as expected
X-Send-Pr-Version: 3.95
>Number: 26741
>Category: bin
>Synopsis: "raidctl -S" doesn't always work as expected
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: oster
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 23 12:24:00 +0000 2004
>Closed-Date:
>Last-Modified: Fri Aug 27 15:58:00 +0000 2004
>Originator:
>Release: NetBSD 2.0_BETA
>Organization:
Matthias Scheler http://scheler.de/~matthias/
>Environment:
System: NetBSD colwyn.zhadum.de 2.0_BETA NetBSD 2.0_BETA (COLWYN) #0: Mon Jul 26 12:22:36 CEST 2004 tron@colwyn.zhadum.de:/src/sys/compile/COLWYN i386
Architecture: i386
Machine: i386
>Description:
My system suffered death by administration a few minutes ago and is now
rewriting the parity on the RAIDframe mirror "raid0". "raidctl -S raid0"
works nicely here:
tron@colwyn:~>raidctl -S raid0
Reconstruction is 100% complete.
Parity Re-write is 0% complete.
Copyback is 100% complete.
Parity Re-write status:
4% |* | ETA: 01:41:31 /
But although the parity of the other mirror is also dirty ...
tron@colwyn:~>raidctl -s raid1
[...]
Parity status: DIRTY
Reconstruction is 100% complete.
Parity Re-write is 100% complete.
Copyback is 100% complete.
... "raidctl -S raid1" returns immediately as if everything is allright:
tron@colwyn:~>time raidctl -S raid1
Reconstruction is 100% complete.
Parity Re-write is 100% complete.
Copyback is 100% complete.
raidctl -S raid1 0.01s user 0.00s system 354% cpu 0.003 total
It should at least print a warning that the mirror isn't in sync.
>How-To-Repeat:
Hard crash a system with two RAIDframe mirrors. Use "raidctl -S raid1"
while the first mirror is rewriting the parity.
>Fix:
None provided.
>Release-Note:
>Audit-Trail:
From: "Greg A. Woods" <woods@weird.com>
To: tron@zhadum.de
Cc: NetBSD GNATS submissions and followups <gnats-bugs@gnats.netbsd.org>,
NetBSD Bugs and PR posting List <netbsd-bugs@NetBSD.ORG>
Subject: Re: bin/26741: "raidctl -S" doesn't always work as expected
Date: Tue, 24 Aug 2004 17:08:04 -0400 (EDT)
[ On Monday, August 23, 2004 at 14:23:22 (+0200), Matthias Scheler wrote: ]
> Subject: bin/26741: "raidctl -S" doesn't always work as expected
>
I think this wee patch may help make it do what you want:
Index: sbin/raidctl/raidctl.c
===================================================================
RCS file: /cvs/master/m-NetBSD/main/src/sbin/raidctl/raidctl.c,v
retrieving revision 1.30
diff -u -r1.30 raidctl.c
--- sbin/raidctl/raidctl.c 21 Mar 2002 00:27:11 -0000 1.30
+++ sbin/raidctl/raidctl.c 11 Jul 2004 17:40:38 -0000
@@ -301,7 +301,7 @@
}
break;
case RAIDFRAME_CHECK_RECON_STATUS_EXT:
- check_status(fd,1);
+ check_status(fd,verbose);
break;
case RAIDFRAME_GET_INFO:
if (do_output)
@@ -860,10 +860,14 @@
int fd;
int meter;
{
+ int is_clean = 0;
int recon_percent_done = 0;
int parity_percent_done = 0;
int copyback_percent_done = 0;
+ do_ioctl(fd, RAIDFRAME_CHECK_PARITY, &is_clean,
+ "RAIDFRAME_CHECK_PARITY");
+ printf("Parity status: %s\n", is_clean ? "clean" : "DIRTY");
do_ioctl(fd, RAIDFRAME_CHECK_RECON_STATUS, &recon_percent_done,
"RAIDFRAME_CHECK_RECON_STATUS");
printf("Reconstruction is %d%% complete.\n", recon_percent_done);
--
Greg A. Woods
+1 416 218-0098 VE3TCP RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com> Secrets of the Weird <woods@weird.com>
From: Matthias Scheler <tron@zhadum.de>
To: NetBSD Bugs and PR posting List <netbsd-bugs@NetBSD.ORG>
Cc: NetBSD GNATS submissions and followups <gnats-bugs@gnats.netbsd.org>
Subject: Re: bin/26741: "raidctl -S" doesn't always work as expected
Date: Wed, 25 Aug 2004 08:32:29 +0200
On Tue, Aug 24, 2004 at 05:08:04PM -0400, Greg A. Woods wrote:
> I think this wee patch may help make it do what you want:
>
> Index: sbin/raidctl/raidctl.c
> ===================================================================
> RCS file: /cvs/master/m-NetBSD/main/src/sbin/raidctl/raidctl.c,v
> retrieving revision 1.30
> diff -u -r1.30 raidctl.c
> --- sbin/raidctl/raidctl.c 21 Mar 2002 00:27:11 -0000 1.30
> +++ sbin/raidctl/raidctl.c 11 Jul 2004 17:40:38 -0000
> @@ -301,7 +301,7 @@
> }
> break;
> case RAIDFRAME_CHECK_RECON_STATUS_EXT:
> - check_status(fd,1);
> + check_status(fd,verbose);
> break;
> case RAIDFRAME_GET_INFO:
> if (do_output)
> @@ -860,10 +860,14 @@
> int fd;
> int meter;
> {
> + int is_clean = 0;
> int recon_percent_done = 0;
> int parity_percent_done = 0;
> int copyback_percent_done = 0;
>
> + do_ioctl(fd, RAIDFRAME_CHECK_PARITY, &is_clean,
> + "RAIDFRAME_CHECK_PARITY");
> + printf("Parity status: %s\n", is_clean ? "clean" : "DIRTY");
> do_ioctl(fd, RAIDFRAME_CHECK_RECON_STATUS, &recon_percent_done,
> "RAIDFRAME_CHECK_RECON_STATUS");
> printf("Reconstruction is %d%% complete.\n", recon_percent_done);
That would result in something like ...
Parity status: DIRTY
Reconstruction is 100% complete.
Parity Re-write is 100% complete.
Copyback is 100% complete.
... which looks wrong, too. I wonder why RAIDFRAME_CHECK_RECON_STATUS
return 100% if the reconstruction hasn't even started.
Kind regards
--
Matthias Scheler http://scheler.de/~matthias/
From: Greg Oster <oster@cs.usask.ca>
To: Matthias Scheler <tron@zhadum.de>
Cc: NetBSD Bugs and PR posting List <netbsd-bugs@NetBSD.ORG>,
NetBSD GNATS submissions and followups <gnats-bugs@gnats.netbsd.org>
Subject: Re: bin/26741: "raidctl -S" doesn't always work as expected
Date: Wed, 25 Aug 2004 07:44:38 -0600
Matthias Scheler writes:
> On Tue, Aug 24, 2004 at 05:08:04PM -0400, Greg A. Woods wrote:
> > I think this wee patch may help make it do what you want:
> >
> > Index: sbin/raidctl/raidctl.c
> > ===================================================================
> > RCS file: /cvs/master/m-NetBSD/main/src/sbin/raidctl/raidctl.c,v
> > retrieving revision 1.30
> > diff -u -r1.30 raidctl.c
> > --- sbin/raidctl/raidctl.c 21 Mar 2002 00:27:11 -0000 1.30
> > +++ sbin/raidctl/raidctl.c 11 Jul 2004 17:40:38 -0000
> > @@ -301,7 +301,7 @@
> > }
> > break;
> > case RAIDFRAME_CHECK_RECON_STATUS_EXT:
> > - check_status(fd,1);
> > + check_status(fd,verbose);
> > break;
> > case RAIDFRAME_GET_INFO:
> > if (do_output)
> > @@ -860,10 +860,14 @@
> > int fd;
> > int meter;
> > {
> > + int is_clean = 0;
> > int recon_percent_done = 0;
> > int parity_percent_done = 0;
> > int copyback_percent_done = 0;
> >
> > + do_ioctl(fd, RAIDFRAME_CHECK_PARITY, &is_clean,
> > + "RAIDFRAME_CHECK_PARITY");
> > + printf("Parity status: %s\n", is_clean ? "clean" : "DIRTY");
> > do_ioctl(fd, RAIDFRAME_CHECK_RECON_STATUS, &recon_percent_done,
> > "RAIDFRAME_CHECK_RECON_STATUS");
> > printf("Reconstruction is %d%% complete.\n", recon_percent_done);
>
> That would result in something like ...
>
> Parity status: DIRTY
> Reconstruction is 100% complete.
> Parity Re-write is 100% complete.
> Copyback is 100% complete.
>
> ... which looks wrong, too. I wonder why RAIDFRAME_CHECK_RECON_STATUS
> return 100% if the reconstruction hasn't even started.
Cause it's somewhat bogus? :)
The "-S" option of raidctl is only meant to return the status of
parity rewriting, reconstruction, or copyback. It's not meant to
tell you if the parity is dirty or not.
Arguably, "-S" should just go away, as the information it provides is
already in "-s" (where it is also too verbose, and shouldn't be
reporting 100% complete when it hasn't started anything.) It's on my
"todo" list to fix these, but it hasn't made it onto the priority
radar.
Later...
Greg Oster
From: "Greg A. Woods" <woods@planix.com>
To: Matthias Scheler <tron@zhadum.de>
Cc: NetBSD Bugs and PR posting List <netbsd-bugs@NetBSD.ORG>,
NetBSD GNATS submissions and followups <gnats-bugs@gnats.netbsd.org>
Subject: Re: bin/26741: "raidctl -S" doesn't always work as expected
Date: Thu, 26 Aug 2004 19:31:03 -0400 (EDT)
[ On Wednesday, August 25, 2004 at 08:32:29 (+0200), Matthias Scheler wrote: ]
> Subject: Re: bin/26741: "raidctl -S" doesn't always work as expected
>
> That would result in something like ...
>
> Parity status: DIRTY
> Reconstruction is 100% complete.
> Parity Re-write is 100% complete.
> Copyback is 100% complete.
Indeed it does.
> ... which looks wrong, too.
Well it certainly seems a heck of a lot better than saying "100%
complete" about everything when there's an obvious problem with the RAID
set....
> I wonder why RAIDFRAME_CHECK_RECON_STATUS
> return 100% if the reconstruction hasn't even started.
It's the status of the _previous_ operation when one is not ongoing.
That seems logical enough to me. :-)
How's it supposed to know what the operator might do in the future?
--
Greg A. Woods
Planix, Inc.
<woods@planix.com> +1 416 489-5852 x122 http://www.planix.com/
Responsible-Changed-From-To: bin-bug-people->oster
Responsible-Changed-By: oster
Responsible-Changed-When: Fri Aug 27 15:57:37 UTC 2004
Responsible-Changed-Why:
I look after RAIDframe lossage.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.