From: Roger Gammans <roger@computer-surgery.co.uk>
To: linux-raid@vger.kernel.org
Subject: [patch] raidstart problem - weakness or bug
Date: Fri, 14 Nov 2003 00:07:37 +0000 [thread overview]
Message-ID: <20031114000736.GA26329@computer-surgery.co.uk> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 969 bytes --]
Hi
I'v decided to build a raid set for on one of my machines here
and while setting I did a simulated fail test so I knew what to expect
out of the fail/recovery process.
In the course of this I discover that raidstart (I used debian stable
to start with but reproduced and patched on raidtools 1.00-3)
won't start and array where the first drive listed in /etc/raidtab
has failed - or more accurately whose superblock is not readable.
An afternoons read through the code has led me to suggest this
patch as a fix. No doubt the more experienced raid hands will tell
me this is wrong for some subtle reason i can't see. ;_)
So what have I got wrong ?
TTFN
--
Roger. Home| http://www.sandman.uklinux.net/
Master of Peng Shui. (Ancient oriental art of Penguin Arranging)
Work|Independent Systems Consultant | http://www.firstdatabase.co.uk/
So what are the eigenvalues and eigenvectors of 'The Matrix'? --anon
[-- Attachment #1.2: raidtools.diff --]
[-- Type: text/plain, Size: 676 bytes --]
diff -urN raidtools-1.00.3/raidlib.c raidtools-1.00.3-rgg/raidlib.c
--- raidtools-1.00.3/raidlib.c Wed Jan 15 08:58:25 2003
+++ raidtools-1.00.3-rgg/raidlib.c Thu Nov 13 16:51:37 2003
@@ -460,11 +460,19 @@
case raidstart:
{
struct stat s;
+ int i=0;
+ for ( i=0; i< MD_SB_DISKS; ++i) {
+
+ if (!cfg->device_name[i][0]) {
+ rc++;
+ break;
+ }
+ stat (cfg->device_name[i], &s);
- stat (cfg->device_name[0], &s);
-
- fd = open_or_die(cfg->md_name);
- if (do_mdstart (fd, cfg->md_name, s.st_rdev)) rc++;
+ fd = open_or_die(cfg->md_name);
+ if ( ! do_mdstart (fd, cfg->md_name, s.st_rdev))
+ break;
+ }
break;
}
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next reply other threads:[~2003-11-14 0:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-14 0:07 Roger Gammans [this message]
2003-11-14 0:23 ` [patch] raidstart problem - weakness or bug Neil Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031114000736.GA26329@computer-surgery.co.uk \
--to=roger@computer-surgery.co.uk \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.