5

I have linux software raid (RAID10),

md2 : active raid10 sda6[4](F) sdd5[3] sdc5[2] sdb6[1]
  390620160 blocks 64K chunks 2 near-copies [4/3] [_UUU]

which has degraded state. Can i start recovery operation without removing and adding back failed item of array?

I have already tryed to start the resync operation,

echo 'repair' >/sys/block/md2/md/sync_action

but it has no effect…

I have read in docs, that

echo 'recover' >/sys/block/md2/md/sync_action

do replace failed item of array with the hot spare disk. But what does it do, if i have not hotspare partition for this array?

1 Answer 1

5

Unfortunately you will need to 'remove' and add the failed drive back to the array. this can be done without actually removing the drive from the system and will rebuild the array from the same partition.

It looks like /dev/sda6 is the failed partition. the following command should remove it, add it back as spare and allow the system to rebuild.

mdadm --manage /dev/md0 -f /dev/sda6 -r /dev/sda6 -a /dev/sda6

in sequence -f(ail) -r(emove) -a(dd)

2
  • Is this operation safe? Should i stop my services, which use this md partition?
    – hraphrap
    Dec 22, 2011 at 10:47
  • "Playing around" with raid is never 100% safe, however this should be a non-interruptive action and can be done while services are running.
    – Flash
    Dec 22, 2011 at 10:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .