Skip to contentSkip to conversation

Reconfiguring one SW-RAID when other RAIDs are running

DISCUSSION H. Peter Anvin 3 participants 6 messages Nov 5, 2002

lore
Share & tools
lore
#0 lore raw

Hi all,

I'm trying to re-create a RAID while leaving the other RAIDs -- including the root filesystem -- running, but mkraid refuses to run:

hera 1 # mkraid /dev/md2
/dev/md0: array is active -- run raidstop first.
mkraid: aborted.
(In addition to the above messages, see the syslog and /proc/mdstat as well
for potential clues.)

hera 2 # cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid5] [multipath] read_ahead 1024 sectors
md1 : active raid5 sdf2[5] sdc2[4] sde2[2] sdd2[3] sdb2[1] sda2[0]

      50339328 blocks level 5, 64k chunk, algorithm 0 [4/4] [UUUU]

md0 : active raid5 sdf3[5] sdc3[4] sde3[2] sdd3[3] sdb3[1] sda3[0]

      298881024 blocks level 5, 64k chunk, algorithm 0 [4/4] [UUUU]

unused devices: <none>

(And no, there is no overlap between them.)

Anyone know how to work around this problem? This is using raidtools-1.00.2-1.3 from RedHat, which seems to be just raidtools-1.00.2.tar.gz.

(Also note: the raid directory on kernel.org seems to be abandoned. Unless someone speaks up I'm going to remove it.)

-hpa

#1 lore raw
Quoted 10 lines · On Monday November 4, [email protected] wrote:

Hi all,

I'm trying to re-create a RAID while leaving the other RAIDs -- including the root filesystem -- running, but mkraid refuses to run:

hera 1 # mkraid /dev/md2
/dev/md0: array is active -- run raidstop first.
mkraid: aborted.
(In addition to the above messages, see the syslog and /proc/mdstat as well
for potential clues.)

I cannot offer any help on using mkraid, except to avoid it :-( mdadm is (I believe and others agree) much easier to use.
http://www.cse.unsw.edu.au/~neilb/source/mdadm/

It is definately being maintained, not that it has needed much...

Quoted 4 lines

(Also note: the raid directory on kernel.org seems to be abandoned. Unless someone speaks up I'm going to remove it.)

Again, I cannot comment on this directory, but would there be any change of getting somewhere on kernel.org to distribute mdadm??

Thanks,
NeilBrown

#2 lore raw
Quoted 13 lines · Neil Brown
Quoted 9 lines · On Monday November 4, [email protected] wrote:

Hi all,

I'm trying to re-create a RAID while leaving the other RAIDs -- including the root filesystem -- running, but mkraid refuses to run:

hera 1 # mkraid /dev/md2
/dev/md0: array is active -- run raidstop first.
mkraid: aborted.
(In addition to the above messages, see the syslog and /proc/mdstat as well
for potential clues.)

Quoted 6 lines

I cannot offer any help on using mkraid, except to avoid it :-( mdadm is (I believe and others agree) much easier to use.
http://www.cse.unsw.edu.au/~neilb/source/mdadm/

It is definately being maintained, not that it has needed much...

I actually ended up using mdadm... I actually dislike it not using the raidtab file at least as an option; I find the raidtab file to be good documentation for what one had done. I would prefer for mkraid to get fixed, if it hasn't already.

Quoted 8 lines
Quoted 3 lines

(Also note: the raid directory on kernel.org seems to be abandoned. Unless someone speaks up I'm going to remove it.)

Again, I cannot comment on this directory, but would there be any change of getting somewhere on kernel.org to distribute mdadm??

Absolutely... send a GPG key to [email protected].

-hpa

#3 lore raw
Quoted 3 lines · H. Peter Anvin

I actually ended up using mdadm... I actually dislike it not using the raidtab file at least as an option; I find the raidtab file to be good documentation for what one had done.

Well, lsraid -R can give you the raidtab back from an mdadm
created array. This can be nice and easy documentation. In fact, there's no reason a boot script can't run
'lsraid -R -p > /etc/raidtab.boot'

Joel

Signature · 10 lines
"We will have to repent in this generation not merely for the
 vitriolic words and actions of the bad people, but for the 
 appalling silence of the good people."
	- Rev. Dr. Martin Luther King, Jr.

Joel Becker
Senior Member of Technical Staff
Oracle Corporation
E-mail: [email protected]
Phone: (650) 506-8127
#4 lore raw
Quoted 7 lines · Joel Becker
Quoted 3 lines · H. Peter Anvin

I actually ended up using mdadm... I actually dislike it not using the raidtab file at least as an option; I find the raidtab file to be good documentation for what one had done.

Quoted 5 lines

Well, lsraid -R can give you the raidtab back from an mdadm
created array. This can be nice and easy documentation. In fact, there's no reason a boot script can't run
'lsraid -R -p > /etc/raidtab.boot'

That's nice, but I still like to be able to use the "edit raidtab then mkraid", mostly because I think I'm less likely to screw up that way.

-hpa

#5 lore raw
In reply to H. Peter Anvin
Quoted 10 lines · On Monday November 4, [email protected] wrote:

Hi all,

I'm trying to re-create a RAID while leaving the other RAIDs -- including the root filesystem -- running, but mkraid refuses to run:

hera 1 # mkraid /dev/md2
/dev/md0: array is active -- run raidstop first.
mkraid: aborted.
(In addition to the above messages, see the syslog and /proc/mdstat as well
for potential clues.)

My guess is that the following patch would fix it, but I haven't tested it.

NeilBrown

mkraid.c +1 -1
@@ -244,7 +244,7 @@ int main (int argc, char *argv[])
     while (*args) {
 	for (p = cfg_head; p; p = p->next) {
 	    if (strcmp(p->md_name, *args)) continue;
-	    if (check_active(cfg)) 
+	    if (check_active(p)) 
 		goto abort;
 	    if (force_flag) {
 		fprintf(stderr, "DESTROYING the contents of %s in 5 seconds, Ctrl-C if unsure!\n", *args);