linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mdadm: error when using multiple ARRAY <ignore> lines in mdadm.conf
@ 2012-11-11  8:43 Mike Frysinger
  2012-11-22  5:28 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2012-11-11  8:43 UTC (permalink / raw)
  To: linux-raid

[-- Attachment #1: Type: Text/Plain, Size: 261 bytes --]

the mdadm.conf documentation indicates that <ignore> is special and can be 
specified multiple times.  unfortunately, that is not the case:
	mdadm: Device <ignore> given twice in config file
	mdadm: Duplicate MD device names in conf file were found.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mdadm: error when using multiple ARRAY <ignore> lines in mdadm.conf
  2012-11-11  8:43 mdadm: error when using multiple ARRAY <ignore> lines in mdadm.conf Mike Frysinger
@ 2012-11-22  5:28 ` NeilBrown
  0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2012-11-22  5:28 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]

On Sun, 11 Nov 2012 03:43:42 -0500 Mike Frysinger <vapier@gentoo.org> wrote:

> the mdadm.conf documentation indicates that <ignore> is special and can be 
> specified multiple times.  unfortunately, that is not the case:
> 	mdadm: Device <ignore> given twice in config file
> 	mdadm: Duplicate MD device names in conf file were found.
> -mike

Fix by following patch.

thanks,
NeilBrown


From 13f2dd6be5618ff556f9a364903e4b95558115e1 Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb@suse.de>
Date: Thu, 22 Nov 2012 16:28:00 +1100
Subject: [PATCH] conf: allow multiple arrays to be <ignore>d

We currently complain if mdadm.conf contains multiple
definitions for the same name.  Unfortunately this stops
multiple arrays  from being <ignored>d.

So exclude "<ignore>" from the duplicate-names test.

Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: NeilBrown <neilb@suse.de>

diff --git a/config.c b/config.c
index 656d4e2..8461309 100644
--- a/config.c
+++ b/config.c
@@ -1095,6 +1095,8 @@ int conf_verify_devnames(struct mddev_ident *array_list)
 	for (a1 = array_list; a1; a1 = a1->next) {
 		if (!a1->devname)
 			continue;
+		if (strcmp(a1->devname, "<ignore>") == 0)
+			continue;
 		for (a2 = a1->next; a2; a2 = a2->next) {
 			if (!a2->devname)
 				continue;

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-22  5:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-11  8:43 mdadm: error when using multiple ARRAY <ignore> lines in mdadm.conf Mike Frysinger
2012-11-22  5:28 ` NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).