linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Trying to get POLICY working
@ 2014-10-31 15:19 Caspar Smit
  2014-10-31 15:34 ` Robin Hill
  2014-11-01  0:20 ` NeilBrown
  0 siblings, 2 replies; 6+ messages in thread
From: Caspar Smit @ 2014-10-31 15:19 UTC (permalink / raw)
  To: linux-raid

Hi all,

I'm trying to get the POLICY framework of mdadm working but I can't seem to.

As i understand in the man page of mdadm the Incremental and POLICY
directives could allow adding a new disk without MD superblock as
spare to an already active array:

"Note that mdadm will normally only add devices to an array which were
previously working (active or spare) parts of that array.  The support
for automatic inclusion of a new drive as a spare in some array
requires a configuration through POLICY in config file."

Furthermore:

"If no md metadata is found, the device may be still added to an array
as a spare if POLICY allows."


To get the basics working I created a system with 3 disks /dev/sdb,
/dev/sdc and /dev/sdd

Created a RAID5 with one missing disk:

mdadm -C /dev/md0 -l 5 -n 3 /dev/sd[b-c] missing

I set the POLICY in mdadm.conf to:

POLICY action=force-spare

This should add any device (passed through mdadm --incremental) as
spare no matter what (Am i correct?)

Now when I do:

#mdadm --incremental /dev/sdd
mdadm: no RAID superblock on /dev/sdd.

Well, i know there is no MD superblock on /dev/sdd but shouldn't the
policy setting kick in here and add /dev/sdd as spare (and hence start
rebuilding) to /dev/md0?

mdadm version: 3.2.5-5 (latest debian wheezy stable)
kernel version: 3.2.63-2 (latest debian wheezy stable)

Kind regards,
Caspar Smit

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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-31 15:19 Trying to get POLICY working Caspar Smit
2014-10-31 15:34 ` Robin Hill
2014-11-01  0:20 ` NeilBrown
2014-11-03  1:54   ` NeilBrown
2014-11-03  9:43     ` Caspar Smit
2014-11-05  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).