Re: [Hampshire] Problem with software raid

Top Page

Reply to this message
Author: Stan
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Problem with software raid
So /dev/sdb3 was the device that failed and the number of events on
the remaining two devices is the same. So to start the array you
should be able run

mdadm --assemble /dev/md0 --uuid=84087667:ce58ade4:68147ff7:77e6d0fd
mdadm: /dev/md0 has been started with 2 drives (out of 3).

cat /proc/mdstat

assuming that this shows the state as "clean, degraded" you should
then be able to add back in the failed device.

mdadm --manage /dev/md0 --add /dev/sdb3
mdadm: re-added /dev/loop0

cat /proc/mdstat 
Personalities : [raid6] [raid5] [raid4] 
md0 : active raid5 loop0[3] loop1[1] loop2[2]
      2097024 blocks level 5, 64k chunk, algorithm 2 [3/2] [_UU]
      [====>................]  recovery = 23.9% (251384/1048512) finish=2.3min speed=5631K/sec


unused devices: <none>


Hope this helps.

btw as always if you have lots of spare disk then it's a good idea to
take copies of the disks/partitions first.

Stan


On Wed, Apr 28, 2010 at 07:26:55PM +0100, James Courtier-Dutton wrote:
> Hi,
>
> Below is the output from the mdadm -E option for my 3 partitions in a
> raid array.
> As you can see, each drive disagrees with the state of the array.
> No matter what I try, I cannot seem to get the array back in sync again.
> One sees this:
> this     0       8       19        0      active sync   /dev/sdb3
>    0     0       8       19        0      active sync   /dev/sdb3
>    1     1       8       35        1      active sync   /dev/sdc3
>    2     2       8       51        2      active sync   /dev/sdd3

>
> this     1       8       35        1      active sync   /dev/sdc3
>    0     0       0        0        0      removed
>    1     1       8       35        1      active sync   /dev/sdc3
>    2     2       8       51        2      active sync   /dev/sdd3

>
> this     1       8       35        1      active sync   /dev/sdc3
>    0     0       0        0        0      removed
>    1     1       8       35        1      active sync   /dev/sdc3
>    2     2       8       51        2      active sync   /dev/sdd3

>
> How do I get them all to agree which one has been removed?
> I get errors like, when I try to remove /dev/sdb3 from the array it
> does not let me, saying it is already removed.
> when I try to add it, it says the drive is already in use.
>
> Kind Regards
>
> James
>
>
> root@quad:/home/raid# mdadm -E /dev/sdb3
> /dev/sdb3:
>           Magic : a92b4efc
>         Version : 00.90.00
>            UUID : 84087667:ce58ade4:68147ff7:77e6d0fd (local to host quad)
>   Creation Time : Fri Apr 16 17:44:30 2010
>      Raid Level : raid5
>   Used Dev Size : 195502912 (186.45 GiB 200.19 GB)
>      Array Size : 391005824 (372.89 GiB 400.39 GB)
>    Raid Devices : 3
>   Total Devices : 3
> Preferred Minor : 3

>
>     Update Time : Fri Apr 16 18:50:30 2010
>           State : clean
>  Active Devices : 3
> Working Devices : 3
>  Failed Devices : 0
>   Spare Devices : 0
>        Checksum : 7ec12025 - correct
>          Events : 20

>
>          Layout : left-symmetric
>      Chunk Size : 64K

>
>       Number   Major   Minor   RaidDevice State
> this     0       8       19        0      active sync   /dev/sdb3

>
>    0     0       8       19        0      active sync   /dev/sdb3
>    1     1       8       35        1      active sync   /dev/sdc3
>    2     2       8       51        2      active sync   /dev/sdd3
> root@quad:/home/raid# mdadm -E /dev/sdc3
> /dev/sdc3:
>           Magic : a92b4efc
>         Version : 00.90.00
>            UUID : 84087667:ce58ade4:68147ff7:77e6d0fd (local to host quad)
>   Creation Time : Fri Apr 16 17:44:30 2010
>      Raid Level : raid5
>   Used Dev Size : 195502912 (186.45 GiB 200.19 GB)
>      Array Size : 391005824 (372.89 GiB 400.39 GB)
>    Raid Devices : 3
>   Total Devices : 2
> Preferred Minor : 3

>
>     Update Time : Wed Apr 28 17:56:51 2010
>           State : clean
>  Active Devices : 2
> Working Devices : 2
>  Failed Devices : 0
>   Spare Devices : 0
>        Checksum : 7ed0e5a0 - correct
>          Events : 32

>
>          Layout : left-symmetric
>      Chunk Size : 64K

>
>       Number   Major   Minor   RaidDevice State
> this     1       8       35        1      active sync   /dev/sdc3

>
>    0     0       0        0        0      removed
>    1     1       8       35        1      active sync   /dev/sdc3
>    2     2       8       51        2      active sync   /dev/sdd3
> root@quad:/home/raid# mdadm -E /dev/sdd3
> /dev/sdd3:
>           Magic : a92b4efc
>         Version : 00.90.00
>            UUID : 84087667:ce58ade4:68147ff7:77e6d0fd (local to host quad)
>   Creation Time : Fri Apr 16 17:44:30 2010
>      Raid Level : raid5
>   Used Dev Size : 195502912 (186.45 GiB 200.19 GB)
>      Array Size : 391005824 (372.89 GiB 400.39 GB)
>    Raid Devices : 3
>   Total Devices : 2
> Preferred Minor : 3

>
>     Update Time : Wed Apr 28 17:56:51 2010
>           State : clean
>  Active Devices : 2
> Working Devices : 2
>  Failed Devices : 0
>   Spare Devices : 0
>        Checksum : 7ed0e5b2 - correct
>          Events : 32

>
>          Layout : left-symmetric
>      Chunk Size : 64K

>
>       Number   Major   Minor   RaidDevice State
> this     2       8       51        2      active sync   /dev/sdd3

>
>    0     0       0        0        0      removed
>    1     1       8       35        1      active sync   /dev/sdc3
>    2     2       8       51        2      active sync   /dev/sdd3
> root@quad:/home/raid#
> root@quad:/home/raid# exit
> exit

>
> --
> Please post to: Hampshire@???
> Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
> LUG URL: http://www.hantslug.org.uk
> --------------------------------------------------------------