public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Richard Fish" <bigfish@asmallpond.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] mdadm fails to add drive to arry
Date: Sat, 2 Sep 2006 02:26:13 -0700	[thread overview]
Message-ID: <7573e9640609020226h5aca3ed7o8119b449f7f2e745@mail.gmail.com> (raw)
In-Reply-To: <20060902063018.2171.qmail@web31810.mail.mud.yahoo.com>

On 9/1/06, Richard Broersma Jr <rabroersma@yahoo.com> 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: <none>

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: <none>

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



  reply	other threads:[~2006-09-02  9:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-02  4:13 [gentoo-user] mdadm fails to add drive to arry Richard Broersma Jr
2006-09-02  6:10 ` Richard Fish
2006-09-02  6:14   ` Richard Fish
2006-09-02  6:30     ` Richard Broersma Jr
2006-09-02  9:26       ` Richard Fish [this message]
2006-09-02 17:19         ` Richard Broersma Jr
2006-09-02 20:50           ` Richard Fish
2006-09-02  6:23   ` Richard Broersma Jr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7573e9640609020226h5aca3ed7o8119b449f7f2e745@mail.gmail.com \
    --to=bigfish@asmallpond.org \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox