N
N
Natalia2013-03-18 13:55:20
linux
Natalia, 2013-03-18 13:55:20

mdadm - raid 1 - make spare work

I ask the community for help. There is a Linux server on a hetzner - with two SATA disks combined into a mirror (RAID 1) using mdadm. One of the disks is out. After the replacement, I try to rebuild the array. All partitions are rebuilt except for one - the new disk stubbornly gets up as a SPARE. It looks like this:

=========
cat /proc/mdstat
Personalities: [raid1]
md0: active raid1 sda1[2] sdb1[1]
33553336 blocks super 1.0 [2/2] [UU]

md1: active raid1 sda2[2] sdb2[1]
524276 blocks super 1.0 [2/2] [UU]

md127: active raid1 sda5[2](S) sdb5[0]
2110014324 blocks super 1.0 [2/1] [U_]
= ========

Neither googling, nor dancing with a tambourine and mdadm keys did not achieve any result.
Gentlemen and ladies, please tell me how to make sda5 a full-fledged member of the raid?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
merlin-vrn, 2013-03-19
@merlin-vrn

If there are read errors on the only active replica, replication from it will constantly restart and break on the first error, and the second disk will be constantly considered spare.
Solved exactly the same problem. We calculated the address of the sector on which the error occurred, forcibly remapped it using hdparm, and then the replication was completed successfully. (I even asked a question here - how does hdparm process advanced format disks? It turned out that it processes correctly, cleans all eight sectors.)

S
Semyon Dubina, 2013-03-18
@sam002

Delete, add, wait for synchronization. Ask for a replacement, save the logs. This morning I dabbled in answering this question (look, maybe something will be useful). Look at the crash documentation .

J
joneleth, 2013-03-18
@joneleth

mdadm --grow /dev/md127 -n 2 -x 0
have you tried?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question