Re: mdadm help

From: John-Paul Stewart (jpstewart_at_binaryfoundry.ca)
Date: 09/11/05


Date: Sat, 10 Sep 2005 19:17:01 -0400

CptDondo wrote:
>
> So in my case - /dev/md6 is the existing RAID-1 array consisting of
> /dev/hda1 and /dev/hdb1
> I have now added two new drives, /dev/hdc1 and /dev/hdd1, and I want to
> create a RAID-5 with no spares:
>
> mdadm --manage /dev/md6 -f /dev/hdb1
> ==or - which one==
> mdadm --manage /dev/md6 -r /dev/hdb1

I believe you need to do both, in that order.

You cannot remove a device (with -r) until it is listed as faulty
(either manually with the -f switch or due to actual hardware failure).
  Trying -r first will fail. And trying to add /dev/hdb1 to another
array without first removing it from this one with -r will fail (AFAIK).
  So you need to do both.

[snip]
> ... How do I shut down md6?
> mdadm --manage /dev/md6 -f /dev/hda1
> ==or==
> mdadm --manage /dev/md6 -r /dev/hda1
> ==or==
> ???

You don't want to do either of those this time. You want 'mdadm --stop'
to shutdown the array completely.