Raid1 with active and spare partition
Posted
by
Daniel Baron
on Super User
See other posts from Super User
or by Daniel Baron
Published on 2011-02-14T14:47:45Z
Indexed on
2011/02/14
15:27 UTC
Read the original article
Hit count: 339
I am having the following problem with a RAID1 software raid partition on my Ubuntu system (10.04 LTS, 2.6.32-24-server in case it matters).
One of my disks (sdb5) reported I/O errors and was therefore marked faulty in the array. The array was then degraded with one active device. Hence, I replaced the harddisk, cloned the partition table and added all new partitions to my raid arrays. After syncing all partitions ended up fine, having 2 active devices - except one of them. The partition which reported the faulty disk before, however, did not include the new partition as an active device but as a spare disk:
md3 : active raid1 sdb5[2] sda5[1]
4881344 blocks [2/1] [_U]
A detailed look reveals:
root@server:~# mdadm --detail /dev/md3
[...]
Number Major Minor RaidDevice State
2 8 21 0 spare rebuilding /dev/sdb5
1 8 5 1 active sync /dev/sda5
So here is the question: How do I tell my raid to turn the spare disk into an active one? And why has it been added as a spare device? Recreating or reassembling the array is not an option, because it is my root partition. And I can not find any hints to that subject in the Software Raid HOWTO.
Any help would be appreciated.
© Super User or respective owner