[SATLUG] First question - RAID5 quit working

David Labens adlabens at swbell.net
Sun Aug 16 22:12:42 CDT 2009

WOW!!! Y'all are more help in an afternoon than I've gotten in 2 WEEKS from either/both linuxquestions.org or ubuntuforums.org!!!

It's been a long day, I've built a train table for the kids and done laundry & a dozen other things, so I've not been able to concentrate on this (life "happens" right?).  HOWEVER, it's clear to me that y'all have put me on the right track, and I'm going to go through the steps (including the study - AND the prayer - parts).  It may take a few days for me to make it through this, but I shall, and I shall respond with results.  THANK YOU!!!

David Labens

San Antonio, TX

--- On Sun, 8/16/09, Don Wright <satlug at sbcglobal.net> wrote:

From: Don Wright <satlug at sbcglobal.net>
Subject: Re: [SATLUG] First question - RAID5 quit working
To: "The San Antonio Linux User's Group Mailing List" <satlug at satlug.org>
Date: Sunday, August 16, 2009, 6:15 PM

On Sat, 15 Aug 2009 17:43:54 -0700 (PDT), David Labens
<adlabens at swbell.net> wrote:

>mdadm: /dev/md/0 assembled from 2 drives - not enough to start the array.

Fixing the RAID, Part II

One additional bit of advice before we start. You don't want to mount
the underlying volume before you get the RAID repaired so the array
contents stay in sync. The RAID will be mountable as soon as at least
one extra drive is added, but your data will be safer if we avoid doing
things by accident. If you're worried this might happen, just comment
out the line in /etc/fstab that mounts the array. Any surprise reboots
halfway through will be less annoying.

Now that you have verified the hardware is working, let's see what mdadm
has to say about it.

I have a three-drive setup similar to yours. I've marked one as failed.
I'll trim the display "<...>" to just what's under discussion.

>turbo:~# mdadm --detail /dev/md0
> <...>
>    Update Time : Sun Aug 16 17:30:23 2009
>          State : clean, degraded
> Active Devices : 2
>Working Devices : 2
> Failed Devices : 1
>  Spare Devices : 0
> <...>
>    Number   Major   Minor   RaidDevice State
>       0       8       17        0      active sync   /dev/sdb1
>       1       8       33        1      active sync   /dev/sdc1
>       2       0        0        2      removed
>       3       8       49        -      faulty spare   /dev/sdd1

This shows the problem drive. I'll remove it from the array to allow
further checking. Since you have two problem drives, repeat the command
for the additional drive.

>turbo:~# mdadm /dev/md0 --remove /dev/sdd1
>mdadm: hot removed /dev/sdd1

Now look at what mdadm has to say about the device:

>turbo:~# mdadm --examine /dev/sdd1
> <...>
>    Update Time : Sun Aug 16 17:23:32 2009
>          State : clean
> Active Devices : 2
>Working Devices : 3
> Failed Devices : 1
>  Spare Devices : 1
>       Checksum : ccd1e7c3 - correct
>         Events : 558
>         Layout : left-symmetric
>     Chunk Size : 64K
>      Number   Major   Minor   RaidDevice State
>this     3       8       49        3      spare   /dev/sdd1
>   0     0       8       17        0      active sync   /dev/sdb1
>   1     1       8       33        1      active sync   /dev/sdc1
>   2     2       0        0        2      faulty removed
>   3     3       8       49        3      spare   /dev/sdd1

Note that mdadm still associates /dev/sdd1 with the /dev/md0 array
because they have the same magic number.

The drive is clean and ready to re-add to the array, so let's do it. If
this were a new drive (already partitioned correctly)  you would use
--add instead.

>turbo:~# mdadm /dev/md0 --re-add /dev/sdd1
>mdadm: re-added /dev/sdd1

That was easy. Since this simulated only a single drive failure, the
array could have been operating all this time, and the re-sync would
have proceeded automatically.

>turbo:~# mdadm --detail /dev/md0
> <...>
>    Number   Major   Minor   RaidDevice State
>       0       8       17        0      active sync   /dev/sdb1
>       1       8       33        1      active sync   /dev/sdc1
>       3       8       49        2      spare rebuilding   /dev/sdd1

Once both of your drives are added to the array, you should be able to
start it and mount the volume(s) using the commands you've already
tried. Don't forget to restore any changes you made to /etc/fstab!

Let us know how it goes.  --Don

A computer is a hole in your desk you pour time into.
SATLUG mailing list
SATLUG at satlug.org
http://alamo.satlug.org/mailman/listinfo/satlug to manage/unsubscribe
Powered by Rackspace (www.rackspace.com)

More information about the SATLUG mailing list