Re: Trying to get POLICY working
From: Robin Hill <hidden>
Date: 2014-10-31 15:34:55
On Fri Oct 31, 2014 at 04:19:04PM +0100, Caspar Smit wrote:
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)
According to the mdadm.conf manual page on my machine:
The action item determines the automatic behavior allowed for
devices matching the path and type in the same line. If a
device matches several lines with different actions then the
most permissive will apply. The ordering of policy lines is
irrelevant to the end result.
With the examples given being:
POLICY domain=domain1 metadata=imsm path=pci-0000:00:1f.2-scsi-* action=spare
POLICY domain=domain1 metadata=imsm path=pci-0000:04:00.0-scsi-[01]* action=include
So I'd guess that the path= entry is required (though the type value
would look to be optional, which is not clear from the text).
HTH,
Robin
--
___
( ' } | Robin Hill [off-list ref] |
/ / ) | Little Jim says .... |
// !! | "He fallen in de water !!" | Attachments
- signature.asc [application/pgp-signature] 181 bytes