|
Home > Archive > Unix administration > February 2007 > Linux RAID-5: 'removed' device directly after creation
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Linux RAID-5: 'removed' device directly after creation
|
|
| L. Kliemann 2007-02-18, 7:21 am |
| mdadm -C /dev/md3 -l5 -n3 /dev/sda7 /dev/sdb7 /dev/sdc7
should create a nice RAID-5 on three disk, shouldn't it?
When I try this, the output of mdadm -D /dev/md3 looks like this:
Number Major Minor RaidDevice State
0 8 7 0 active sync /dev/sda7
1 8 23 1 active sync /dev/sdb7
2 0 0 2 removed
3 8 39 3 active sync /dev/sdc7
Why is there a 'removed' device? Why aren't there just three devices:
sda7, sdb7, and sdc7? The real problem is that this array does not
function properly. Removal of the "middle" device (unplugging the cable
at the controller) breaks the array. It then does not come up at boot
time, and the attempt to assemble the array by hand fails:
# mdadm /dev/md3 -A /dev/sda7 /dev/sdb7
mdadm: device 3 in /dev/md3 has wrong state in superblock, but /dev/sdb7 seems ok
mdadm: /dev/md3 assembled from 1 drive and 1 spare - not enough to start the array.
Now, the story becomes even weirder. This time, I remove the "leftmost"
disk from the controler. Then everything goes fine during boot and the
array looks like this:
Number Major Minor RaidDevice State
0 8 7 0 active sync /dev/sda7
1 8 23 1 active sync /dev/sdb7
2 0 0 2 removed
Re-attaching the disk and doing a --re-add makes the array whole again -
this time without a 'removed' device!
Number Major Minor RaidDevice State
0 8 7 0 active sync /dev/sda7
1 8 23 1 active sync /dev/sdb7
2 8 39 2 active sync /dev/sdc7
I did not test the robustness of this array. What matters most to me is
to understand what is happening here, what went wrong, and what I did
wrong. This machine is to store important data, so it is imperative that
everything works 100% as expected (by me :-).
The system is Trustix Secure Linux release 3.0.5 (RC2) running kernel
2.6.19.2 (self-configured).
Thanks a lot in advance!
Lasse
| |
| L. Kliemann 2007-02-25, 7:16 pm |
| * L. Kliemann <stu33404@mail.uni-kiel.de>:
> mdadm -C /dev/md3 -l5 -n3 /dev/sda7 /dev/sdb7 /dev/sdc7
>
> should create a nice RAID-5 on three disk, shouldn't it?
> When I try this, the output of mdadm -D /dev/md3 looks like this:
>
> Number Major Minor RaidDevice State
> 0 8 7 0 active sync /dev/sda7
> 1 8 23 1 active sync /dev/sdb7
> 2 0 0 2 removed
>
> 3 8 39 3 active sync /dev/sdc7
>
> Why is there a 'removed' device? Why aren't there just three devices:
> sda7, sdb7, and sdc7? The real problem is that this array does not
> function properly. Removal of the "middle" device (unplugging the cable
> at the controller) breaks the array. It then does not come up at boot
> time, and the attempt to assemble the array by hand fails:
>
> # mdadm /dev/md3 -A /dev/sda7 /dev/sdb7
>
> mdadm: device 3 in /dev/md3 has wrong state in superblock, but /dev/sdb7 seems ok
> mdadm: /dev/md3 assembled from 1 drive and 1 spare - not enough to start the array.
[...]
> The system is Trustix Secure Linux release 3.0.5 (RC2) running kernel
> 2.6.19.2 (self-configured).
The issue is solved. Obviously, I used an outdated version of mdadm.
See also:
http://lists.trustix.org/pipermail/...ary/018034.html
Lasse
|
|
|
|
|