From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1GJRqy-0000ez-L3 for garchives@archives.gentoo.org; Sat, 02 Sep 2006 09:31:53 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.6) with SMTP id k829UdRr004401; Sat, 2 Sep 2006 09:30:39 GMT Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.224]) by robin.gentoo.org (8.13.8/8.13.6) with ESMTP id k829QEi9011038 for ; Sat, 2 Sep 2006 09:26:14 GMT Received: by wx-out-0506.google.com with SMTP id r21so1447905wxc for ; Sat, 02 Sep 2006 02:26:14 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=hHDetANiyYWNVJ585GdarjMYrtAlQhsnMrigDLzWTpCF7in7mQLKcYIwyiDh4/49EEfGPPxMmkavv4E2HUZKX+ZfzRmPi3PwKwf2gcCb1Ui7V9Mcaq/EQ1MZDgyjjA19v63gymfGV4luY1kv0cFjh9TMl7RWNMzoXqZc90lvRFM= Received: by 10.70.8.8 with SMTP id 8mr4019402wxh; Sat, 02 Sep 2006 02:26:13 -0700 (PDT) Received: by 10.70.110.1 with HTTP; Sat, 2 Sep 2006 02:26:13 -0700 (PDT) Message-ID: <7573e9640609020226h5aca3ed7o8119b449f7f2e745@mail.gmail.com> Date: Sat, 2 Sep 2006 02:26:13 -0700 From: "Richard Fish" Sender: richard.j.fish@gmail.com To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] mdadm fails to add drive to arry In-Reply-To: <20060902063018.2171.qmail@web31810.mail.mud.yahoo.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7573e9640609012314w74e021aegbf8bdc8726a1d501@mail.gmail.com> <20060902063018.2171.qmail@web31810.mail.mud.yahoo.com> X-Google-Sender-Auth: c8acc294f0e4fe60 X-Archives-Salt: a82ada93-4365-4469-b49a-9e4319add233 X-Archives-Hash: e04e0023049c44d86ed6d70ffe54dd8d On 9/1/06, Richard Broersma Jr wrote: > > Did you remove the faulty device first? > yup. > Personalities : [raid1] [raid10] [multipath] > md4 : active raid1 hdg1[1] > 293049600 blocks [2/1] [_U] > > > IIRC, raid devices start > > numbering at 0, so it looks like this is trying to add a third device > > (#2), instead of replacing #0 or #1. > > I am not exact sure on this point. Are you refering to the meta device? No, I mean the device numbers. I'm now at home, so I can test a bit with my AMD64 box. When I create a raid1 array there, /proc/mdstat contains: Personalities : [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] md0 : active raid1 sdb2[1] sda2[0] 9775488 blocks [2/2] [UU] [>....................] resync = 2.7% (271552/9775488) finish=2.3min speed=67888K/sec Notice the 2 device nodes....[1] and [0]. I think your setup is trying to add a [2], which probably doesn't work because the array was created with --raid-devices=2. This is only a guess though, based on the " as 2" part of the error message. Ok, so lets say I create an array with a missing element: ~ > mdadm --create --level=1 --raid-devices=2 /dev/md0 missing /dev/sdb2 mdadm: /dev/sdb2 appears to be part of a raid array: level=raid1 devices=2 ctime=Sat Sep 2 02:07:13 2006 Continue creating array? yes mdadm: array /dev/md0 started. ~ > cat /proc/mdstat Personalities : [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] md0 : active raid1 sdb2[1] 9775488 blocks [2/1] [_U] unused devices: Ok, so now let me try repairing it... ~ > mdadm --add /dev/md0 /dev/sda2 mdadm: added /dev/sda2 ~ > cat /proc/mdstat Personalities : [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] md0 : active raid1 sda2[2] sdb2[1] 9775488 blocks [2/1] [_U] [>....................] recovery = 3.4% (340928/9775488) finish=2.3min speed=68185K/sec unused devices: Hmm, works fine.... :-( Ok, maybe stupid questions time. /dev/hdj1 does exist, right? Is this the same drive that was once part of the array? Or a new drive? If new, is the partition at least as large as /dev/hdg1? (double check with fdisk output). If the same drive, does it work if you do "mdadm --zero-superblock /dev/hdj1" first? What does "mdadm --examine /dev/hdj1" report? How about for /dev/hdg1? I know that is a lot of questions to ask, but I don't see anything obviously wrong at this point...so I am grasping at straws. -Richard -- gentoo-user@gentoo.org mailing list