I
I
Ivan Istomin2014-07-19 12:54:25
Debian
Ivan Istomin, 2014-07-19 12:54:25

RAID sync problem, why does it go to Spare?

I am on Hetzner hosting, I have a problem:

[email protected] ~ # cat /proc/mdstat
Personalities : [raid1]
md3 : active raid1 sdb4[3](S) sda4[2]
      1843414335 blocks super 1.2 [2/1] [U_]

md2 : active raid1 sdb3[3] sda3[2]
      1073740664 blocks super 1.2 [2/2] [UU]

md1 : active raid1 sdb2[3] sda2[2]
      524276 blocks super 1.2 [2/2] [UU]

md0 : active raid1 sdb1[3] sda1[2]
      12581816 blocks super 1.2 [2/2] [UU]

unused devices: <none>

Removed it from the array:
[email protected] ~ # mdadm --manage /dev/md3 --remove /dev/sdb4
mdadm: hot removed /dev/sdb4 from /dev/md3

Added:
[email protected] ~ # mdadm /dev/md3 --add /dev/sdb4
mdadm: added /dev/sdb4

Synchronization started:
[email protected] ~ # cat /proc/mdstat
Personalities : [raid1]
md3 : active raid1 sdb4[3] sda4[2]
      1843414335 blocks super 1.2 [2/1] [U_]
      [>....................]  recovery =  0.1% (2208832/1843414335) finish=208.3min speed=147255K/sec

md2 : active raid1 sdb3[3] sda3[2]
      1073740664 blocks super 1.2 [2/2] [UU]

md1 : active raid1 sdb2[3] sda2[2]
      524276 blocks super 1.2 [2/2] [UU]

md0 : active raid1 sdb1[3] sda1[2]
      12581816 blocks super 1.2 [2/2] [UU]

unused devices: <none>

Then it just stops, and dist is in spare:
[email protected] ~ # cat /proc/mdstat
Personalities : [raid1]
md3 : active raid1 sdb4[3](S) sda4[2]
      1843414335 blocks super 1.2 [2/1] [U_]

md2 : active raid1 sdb3[3] sda3[2]
      1073740664 blocks super 1.2 [2/2] [UU]

md1 : active raid1 sdb2[3] sda2[2]
      524276 blocks super 1.2 [2/2] [UU]

md0 : active raid1 sdb1[3] sda1[2]
      12581816 blocks super 1.2 [2/2] [UU]

unused devices: <none>
[email protected] ~ # mdadm --detail /dev/md3
/dev/md3:
        Version : 1.2
  Creation Time : Fri Oct 26 07:17:09 2012
     Raid Level : raid1
     Array Size : 1843414335 (1758.02 GiB 1887.66 GB)
  Used Dev Size : 1843414335 (1758.02 GiB 1887.66 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Sat Jul 19 11:12:22 2014
          State : clean, degraded
 Active Devices : 1
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 1

           Name : rescue:3  (local to host rescue)
           UUID : 4dbdb653:27ef38ff:37df58ba:e605ed89
         Events : 11070947

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

       3       8       20        -      spare   /dev/sdb4

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ivan Istomin, 2014-07-30
@Istom1n

The problem was due to a broken HDD, a read error.

M
Melkij, 2014-07-19
@melkij

Try to mark as bad, remove, remove superblock and add back:
mdadm /dev/md3 -f /dev/sdb4
mdadm /dev/md3 -r /dev/sdb4
mdadm --zero-superblock /dev/sdb4
mdadm /dev/md3 - a /dev/sdb4

I
Igor, 2014-07-20
@merryjane

Maybe this will help you:
superuser.com/questions/429776/simple-mdadm-raid-1...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question