On Thursday October 5, [EMAIL PROTECTED] wrote:
> 
> Unfortunately, mdadm (2.5.3) doesn't seem to agree; it complains
> that it cannot assemble a RAID10 with 4 devices when I ask it to:
> 
>   mdadm --create -l 10 -n4 -pn2 /dev/md1 /dev/sd[cd] missing missing
> 

mdadm --create -l 10 -n 4 -pn2 /dev/md1 /dev/sdc missing /dev/sdd missing

Raid10 lays out data like
  A A B B
  C C D D
not
  A B A B
  C D C D
as you seem to expect.

So you could even do

mdadm --create -l 10 -n 4 -pn2 /dev/md1 missing /dev/sd[cd] missing

for slightly less typing.

There seems to be a bug in raid10 that is reports the wrong number of
working drives.  This is probably only in 2.6.18.  Patch is below.

NeilBrown

Signed-off-by: Neil Brown <[EMAIL PROTECTED]>

### Diffstat output
 ./drivers/md/raid10.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff .prev/drivers/md/raid10.c ./drivers/md/raid10.c
--- .prev/drivers/md/raid10.c   2006-09-29 11:44:36.000000000 +1000
+++ ./drivers/md/raid10.c       2006-10-05 20:10:07.000000000 +1000
@@ -2079,7 +2079,7 @@ static int run(mddev_t *mddev)
                disk = conf->mirrors + i;
 
                if (!disk->rdev ||
-                   !test_bit(In_sync, &rdev->flags)) {
+                   !test_bit(In_sync, &disk->rdev->flags)) {
                        disk->head_position = 0;
                        mddev->degraded++;
                }
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to