You are not logged in.

#1 2010-06-10 12:52:48

esh
Member
Registered: 2008-11-05
Posts: 28

Missing a hard drive in a RAID

I noticed today that /proc/mdstat isn't quite as it should be, namely:

Personalities : [raid6] [raid5] [raid4] [raid1] 
md2 : active raid1 sda2[0] sdc2[2] sdb2[1]
      2000000 blocks [3/3] [UUU]
      
md1 : active raid1 sda1[0] sdb1[1]
      192640 blocks [3/2] [UU_]
      
md0 : active raid5 sda3[0] sdb3[1]
      972382080 blocks level 5, 64k chunk, algorithm 2 [3/2] [UU_]
      
unused devices: <none>

This is md2 has all three drives, but md0 and md1 do not and are hence degraded. Not sure how long it has been like this. The program 'mdadm' reports that:

    Number   Major   Minor   RaidDevice State
       0       8        3        0      active sync   /dev/sda3
       1       8       19        1      active sync   /dev/sdb3
       2       0        0        2      removed

I assume this is different to failed somehow (espeically since md2 is fine). Has anyone got some tips on how to debug this further? Thanks.

Offline

#2 2010-06-10 17:58:51

wsims
Member
Registered: 2010-04-15
Posts: 34

Re: Missing a hard drive in a RAID

what is the output for the following commands:

mdadm --detail /dev/md0

mdadm --detail /dev/md1

Have you tried adding the missing partitions and re-syncing?

Offline

#3 2010-06-24 19:49:24

farkus888
Member
Registered: 2007-10-31
Posts: 31

Re: Missing a hard drive in a RAID

I am having the same problem with a 2 disk raid 1 array. I tried readding the missing disk and got an error.

Personalities : [raid1] 
md0 : active raid1 sdc1[0]
      732571904 blocks [2/1] [U_]
Personalities : [raid1] 
md0 : active raid1 sdc1[0]
      732571904 blocks [2/1] [U_]
      
unused devices: <none>
[root@will bill]# mdadm
Usage: mdadm --help
  for help
[root@will bill]# cat /proc/mdstat 
Personalities : [raid1] 
md0 : active raid1 sdc1[0]
      732571904 blocks [2/1] [U_]
      
unused devices: <none>
mdadm: /dev/sdd1 does not appear to be an md device

relevant info from blkid

/dev/md0: LABEL="DATA" UUID="7943ec50-8669-47ab-b6e2-ff931c3d1f6b" TYPE="ext4" 
/dev/sdc1: UUID="ca184520-f9f6-4d38-8ec5-336832aadbe8" TYPE="linux_raid_member" 
/dev/sdd1: UUID="ca184520-f9f6-4d38-8ec5-336832aadbe8" TYPE="linux_raid_member"

Is the next step to reformat that drive and try adding it again even though smartctl and fdisk -l both seem to indicate that it is fine and formatted as linux raid autodetect?

Offline

#4 2010-06-24 21:13:05

farkus888
Member
Registered: 2007-10-31
Posts: 31

Re: Missing a hard drive in a RAID

I got impatient waiting for a reply and played with this until I figured it out on my own. First I reformated the drive that had fallen out of the array. Then I readded it to the array with

mdadm /dev/md0 -a /dev/sdd1

cat /proc/mdstat now shows

Personalities : [raid1] 
md0 : active raid1 sdd1[2] sdc1[0]
      732571904 blocks [2/1] [U_]
      [>....................]  recovery =  3.8% (27926016/732571904) finish=121.5min speed=96582K/sec
      
unused devices: <none>

Offline

Board footer

Powered by FluxBB