Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] mdadm fails to add drive to arry
Date: Sat, 02 Sep 2006 09:31:53
Message-Id: 7573e9640609020226h5aca3ed7o8119b449f7f2e745@mail.gmail.com
In Reply to: Re: [gentoo-user] mdadm fails to add drive to arry by Richard Broersma Jr
1 On 9/1/06, Richard Broersma Jr <rabroersma@×××××.com> wrote:
2 > > Did you remove the faulty device first?
3 > yup.
4 > Personalities : [raid1] [raid10] [multipath]
5 > md4 : active raid1 hdg1[1]
6 > 293049600 blocks [2/1] [_U]
7 >
8 >
9 > IIRC, raid devices start
10 > > numbering at 0, so it looks like this is trying to add a third device
11 > > (#2), instead of replacing #0 or #1.
12 >
13 > I am not exact sure on this point. Are you refering to the meta device?
14
15 No, I mean the device numbers. I'm now at home, so I can test a bit
16 with my AMD64 box. When I create a raid1 array there, /proc/mdstat
17 contains:
18
19 Personalities : [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
20 md0 : active raid1 sdb2[1] sda2[0]
21 9775488 blocks [2/2] [UU]
22 [>....................] resync = 2.7% (271552/9775488)
23 finish=2.3min speed=67888K/sec
24
25 Notice the 2 device nodes....[1] and [0]. I think your setup is
26 trying to add a [2], which probably doesn't work because the array was
27 created with --raid-devices=2. This is only a guess though, based on
28 the " as 2" part of the error message.
29
30 Ok, so lets say I create an array with a missing element:
31
32 ~ > mdadm --create --level=1 --raid-devices=2 /dev/md0 missing /dev/sdb2
33 mdadm: /dev/sdb2 appears to be part of a raid array:
34 level=raid1 devices=2 ctime=Sat Sep 2 02:07:13 2006
35 Continue creating array? yes
36 mdadm: array /dev/md0 started.
37 ~ > cat /proc/mdstat
38 Personalities : [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
39 md0 : active raid1 sdb2[1]
40 9775488 blocks [2/1] [_U]
41
42 unused devices: <none>
43
44 Ok, so now let me try repairing it...
45
46 ~ > mdadm --add /dev/md0 /dev/sda2
47 mdadm: added /dev/sda2
48 ~ > cat /proc/mdstat
49 Personalities : [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
50 md0 : active raid1 sda2[2] sdb2[1]
51 9775488 blocks [2/1] [_U]
52 [>....................] recovery = 3.4% (340928/9775488)
53 finish=2.3min speed=68185K/sec
54
55 unused devices: <none>
56
57 Hmm, works fine.... :-(
58
59 Ok, maybe stupid questions time.
60
61 /dev/hdj1 does exist, right?
62 Is this the same drive that was once part of the array? Or a new drive?
63 If new, is the partition at least as large as /dev/hdg1? (double
64 check with fdisk output).
65 If the same drive, does it work if you do "mdadm --zero-superblock
66 /dev/hdj1" first?
67 What does "mdadm --examine /dev/hdj1" report? How about for /dev/hdg1?
68
69 I know that is a lot of questions to ask, but I don't see anything
70 obviously wrong at this point...so I am grasping at straws.
71
72 -Richard
73 --
74 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] mdadm fails to add drive to arry Richard Broersma Jr <rabroersma@×××××.com>