Koozali.org: home of the SME Server

[SOLVED] Help adding replacement HD into failed raid

Offline kruhm

  • *
  • 680
  • +0/-0
[SOLVED] Help adding replacement HD into failed raid
« on: February 26, 2012, 01:20:39 AM »
Hi Everyone,

Can someone help me add a replacement HD back into a failed raid? I've done this before and while I have written instructions about this, there's so much info about this I don't know what's right or wrong anymore. I read something about a superblock issue, so I want to see if the following is correct or if it needs adjustment.

Plain-jane v8

Here's the current situation:
Code: [Select]
# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdb1[2] sda1[1]
      104320 blocks [3/2] [_UU]

md2 : active raid1 sdb2[0] sda2[1]
      976655488 blocks [2/2] [UU]

unused devices: <none>

So, md1 is defunct. Here's the detail of md1:
Code: [Select]
# mdadm --query --detail /dev/md1
/dev/md1:
        Version : 0.90
  Creation Time : Sat Feb 13 08:11:30 2010
     Raid Level : raid1
     Array Size : 104320 (101.89 MiB 106.82 MB)
  Used Dev Size : 104320 (101.89 MiB 106.82 MB)
   Raid Devices : 3
  Total Devices : 2
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Sat Feb 25 18:42:10 2012
          State : clean, degraded
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : a35eaa43:b81d7b0b:e6ceff49:b3d2b1bf
         Events : 0.370

    Number   Major   Minor   RaidDevice State
       0       0        0        0      removed
       1       8        1        1      active sync   /dev/sda1
       2       8       17        2      active sync   /dev/sdb1

So, /dev/sdc is missing. I partition the new drive, right?
Code: [Select]
sfdisk -d /dev/sda > tmp.out
sfdisk /dev/sdc < tmp.out

Now add it back in, right?
Code: [Select]
mdadm --add /dev/md1 /dev/sdc1
If someone could double-check the above, it'd be appreciated. Thanks in advance.
« Last Edit: March 01, 2012, 02:45:44 AM by kruhm »

Offline fpausp

  • *
  • 728
  • +0/-0
Re: Help adding replacement HD into failed raid
« Reply #1 on: February 27, 2012, 05:06:13 PM »
Hi,

For Raid1 this should work with SME-tools. I have done this with sme7, it should also work with sme8.

Logon to the console and type:
Code: [Select]
su admin
In german it is called:
Code: [Select]
5. Festplattenspiegelung einstellen
Viribus unitis

Offline kruhm

  • *
  • 680
  • +0/-0
Re: Help adding replacement HD into failed raid
« Reply #2 on: March 01, 2012, 01:30:14 AM »
Thanks for your reply. What was weird is that I had to select it a few times before it asked if I wanted to add the additional HD in the RAID array. The other times, it said that manual intervention was needed. Go figure.

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: Help adding replacement HD into failed raid
« Reply #3 on: March 01, 2012, 02:39:02 AM »
Thanks for your reply. What was weird is that I had to select it a few times before it asked if I wanted to add the additional HD in the RAID array. The other times, it said that manual intervention was needed. Go figure.

Life is full of little mysteries...
If you issue is resolved, would you please add [SOLVED] to summary.
Thanks.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: [SOLVED] Help adding replacement HD into failed raid
« Reply #4 on: March 01, 2012, 02:48:43 AM »
So, md1 is defunct.

No, it is just degraded.


Quote
So, /dev/sdc is missing.

How did you have a three device raid1 on /dev/md1? Your /dev/md2 was only ever two device raid1.

Having one extra copy of your /boot partition doesn't gain you very much. I'm sure it is not what you intend.

It's possible that /dev/md1 included a removable device at installation time. If so, that is a bug in the installer. We should be ignoring such devices. Please create a bug report. Include a full description of your hardware, and the process you used at installation time.
« Last Edit: March 01, 2012, 02:51:51 AM by CharlieBrady »

Offline kruhm

  • *
  • 680
  • +0/-0
Re: [SOLVED] Help adding replacement HD into failed raid
« Reply #5 on: March 01, 2012, 03:10:39 AM »
Hi Charlie,

Quote
No, it is just degraded.
Yup, good catch.

Quote
How did you have a three device raid1 on /dev/md1? Your /dev/md2 was only ever two device raid1.
Good question. v8b5 when installed. I think it was the default at the time of v8b5 or it asked during the install for either raid5 or raid1 with hot spare. I believe I chose the latter. It was over 18 months ago so I don't remember exactly.

I didn't do anything custom as I try to stick as close to the releases as possible.

ps -looks like a winter storm is heading your way.

Take care,

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: [SOLVED] Help adding replacement HD into failed raid
« Reply #6 on: March 01, 2012, 04:24:13 AM »
Good question.

How about a simpler question - does your system have two hard drives or three?

Quote
It was over 18 months ago so I don't remember exactly.

Feb 2010 according to your "mdadm --query". When did you first receive an email message about a degraded RAID array?

Quote
ps -looks like a winter storm is heading your way.

About time too. We've hardly had a winter.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Help adding replacement HD into failed raid
« Reply #7 on: March 01, 2012, 04:26:01 AM »
If you issue is resolved, would you please add [SOLVED] to summary.

And if it is not, please remove the [SOLVED].

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: [SOLVED] Help adding replacement HD into failed raid
« Reply #8 on: April 19, 2012, 01:02:06 PM »
I believe this may be a bug - see my related post here :

http://forums.contribs.org/index.php/topic,48541.msg241168.html#msg241168

I will add it to the bug tracker
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation