LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Software RAID1 Failure (https://www.linuxquestions.org/questions/linux-server-73/software-raid1-failure-796139/)

carlosinfl 03-17-2010 06:06 PM

Software RAID1 Failure
 
Last night I had a 'software RAID1' mirror break. In short, /dev/sdb has failed and the drive has been replaced since then. My mirror (/dev/md0) was comprised of /dev/sda2 /dev/sdb2.

My system is up and running right now:

Code:

        Version : 0.90
  Creation Time : Thu Jan 14 06:02:07 2010
    Raid Level : raid1
    Array Size : 728571776 (694.82 GiB 746.06 GB)
  Used Dev Size : 728571776 (694.82 GiB 746.06 GB)
  Raid Devices : 2
  Total Devices : 1
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Wed Mar 17 19:02:30 2010
          State : clean, degraded
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

          UUID : 628ada8a:a688bad8:5b69a113:4ec4a0dc
        Events : 0.28149

    Number  Major  Minor  RaidDevice State
      0      8        2        0      active sync  /dev/sda2
      1      0        0        1      removed

My question is how can I re-join /dev/sdb2 in /dev/md0? I have searched Google and the 'mdadm' man page and can't seem to understand how to repair this broken mirror.

troop 03-17-2010 06:24 PM

Code:

mdadm /dev/md0 -a /dev/sdb2

carlosinfl 03-17-2010 07:13 PM

That worked.

garydale 03-23-2010 02:18 PM

In general the same "fix" works in any degraded RAID array (except 0, which isn't really RAID). Simply add the new/fixed partition back into the array.

It will take some to re-sync during which time the array is still available but you won't have redundency.


All times are GMT -5. The time now is 08:37 AM.