Linux RAID-5: 'removed' device directly after creation - Unix

This is a discussion on Linux RAID-5: 'removed' device directly after creation - Unix ; 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 ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Linux RAID-5: 'removed' device directly after creation

  1. Linux RAID-5: 'removed' device directly after creation

    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


  2. Re: Linux RAID-5: 'removed' device directly after creation

    * L. Kliemann :
    > 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/t...ry/018034.html


    Lasse

+ Reply to Thread