First of all, BACKUP YOUR DATA before proceeding because RAID IS NOT BACKUP.

you need to find out how the drives are currently configured... are
you using linux-md? assuming that you are here are some tips:

mdadm --detail /dev/md0 (or wherever it is)

you should see something like:
       0       8       17        0      active sync   /dev/sdb1
       1       8        1        1      active sync   /dev/sda1
       2       8       33        2      active sync   /dev/sdc1
       3       8       49        3      active sync   /dev/sdd1

although in your case one of those will be listed as down, notice how
i have /dev/sdb1, which means i am using the first partition... this
will not always be the case (it might be 2, 3 or whatever, it may even
be the entire drive)

now, BACKUP YOUR DATA before proceeding.

assuming it is a partition then you will want to copy the entire
partition map over from one of the good drives (and i am assuming here
that all drives are partitioned the same, again might not be)
sudo /sbin/sfdisk -d /dev/GOOD| /sbinsfdisk --force /dev/NEW

and BACKUP YOUR DATA before proceeding

Now you can add the drive to the array using mdadm:
mdadm --add /dev/md0 /dev/NEW

and you can monitor the rebuilding process by catting /proc/mdstat,
you will most likely want to update the boot loader so that your
system can boot from the new drive as well.

but BACKUP YOUR DATA before proceeding

Of course, you will want to think long and hard when you are doing any
of this, if you copy the partition table the wrong direction you risk
destroying your data. If you are using something else in addition like
LVM then you will need to adjust accordingly. most importantly however
is that you BACKUP YOUR DATA. and I cannot stress this enough: BACKUP
YOUR DATA before doing any of this.

Remember RAID IS NOT BACKUP. so in case i have not said it enough yet:
BACKUP YOUR DATA.


On Tue, Feb 17, 2015 at 3:41 PM, o1bigtenor <o1bigtenor at gmail.com> wrote:
> Greetings
>
> I have been running a raid 10 array for almost 3 years.
>
> Last September on a reboot (forced by Firefox and kernel memory interaction
> problems) came up with one of the drives being listed as DOA.
> The raid array has continued to run on 3 drives although on reboots there is
> much complaining from whatever in the boot up process.
> I had the replacement drive sent to me and today I installed the drive.
>
> I was under the assumption that the raid array would rebuild itself upon
> startup with a new drive (4th out of 4).
>
> This did not happen.
>
> I am running Debian Jessie (testing) and have the whole time in question.
> I can mount the array and it is visible.
> I'm looking at backing up the array (on blu-ray discs) but as I'm now to
> circa 45 GB of data and I was at about 22 GB when I last did a backup this
> is going to be a momentous event.
>
> How do I ask mdadm to include this new drive into the array? (Without
> borking everything!! I have found lots of instructions on how to create but
> none in an hour of trying different search phrases on how to rebuild or how
> to cause the array to rebuild itself. I have only been able to find
> instructions for when the array is totally sick and I'm not there (yet - - -
> grin!) but I don't want to wait until another drive craps out to get things
> going.)
>
> TIA
>
> Dee
>
> _______________________________________________
> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
> tclug-list at mn-linux.org
> http://mailman.mn-linux.org/mailman/listinfo/tclug-list
>