All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Jon Nelson <jnelson-linux-raid@jamponi.net>
Cc: LinuxRaid <linux-raid@vger.kernel.org>
Subject: Re: behavior different from mdadm 2.6.4 and 3.0?
Date: Tue, 16 Dec 2008 12:27:39 +1100	[thread overview]
Message-ID: <18759.1035.627538.450310@notabene.brown> (raw)
In-Reply-To: message from Jon Nelson on Monday December 15

On Monday December 15, jnelson-linux-raid@jamponi.net wrote:
> On Mon, Dec 15, 2008 at 3:11 PM, Neil Brown <neilb@suse.de> wrote:
> > On Monday December 15, jnelson-linux-raid@jamponi.net wrote:
> >> mdadm --incremental seems to behave differently for me between mdadm
> >> 2.6.4 and 3.0
> >>
> >> With 2.6.4, mdadm --incremental /dev/nbd0 does this:
> >>
> >> mdadm: /dev/nbd0 attached to /dev/md10 which is already active.
> >>
> >> With 3.0, it does this:
> >>
> >> mdadm: /dev/md10 is already in use.
> >>
> >> and does *not* add it to the array.
> >
> > Sounds like /var/run/mdadm/map is not correctly up-to-date.
> > Does running
> >   mdadm -Ir
> >
> > make "mdadm -I /dev/nbd0" work properly again?
> >
> > Can you provide a sequence of steps which leads to the error message
> > that you report?
> 
> I have to reboot to make this happen. There is probably a less
> invasive way.... but it's what I know works.
> 
> First, an strace of mdadm --incremental (3.0):
> 
> turnip:~ # strace -f -e trace=open mdadm --incremental /dev/nbd0
> open("/etc/ld.so.cache", O_RDONLY)      = 3
> open("/lib64/libc.so.6", O_RDONLY)      = 3
> open("/dev/urandom", O_RDONLY)          = 3
> open("/etc/mdadm.conf", O_RDONLY)       = 3
> open("/dev/nbd0", O_RDONLY|O_EXCL|O_DIRECT) = 3
> open("/var/run/mdadm/map.lock", O_RDWR|O_CREAT, 0600) = 3
> open("/var/run/mdadm/map", O_RDONLY)    = -1 ENOENT (No such file or directory)
> open("/var/run/mdadm.map", O_RDONLY)    = -1 ENOENT (No such file or directory)

That's the problem then.
The array was started from initrd and any mdadm/map that was created
would have got lost.
Now it needs one to continue with assembly and cannot find one.
I'll have to get it to do the "-Ir" thing automagically if mdadm/map
does not exist.

> open("/var/run/mdadm/map", O_RDONLY)    = -1 ENOENT (No such file or directory)
> open("/var/run/mdadm.map", O_RDONLY)    = -1 ENOENT (No such file or directory)
> open("/proc/mdstat", O_RDONLY)          = 4
> mdadm: /dev/md11 is already in use.
> turnip:~ #
> 
> 
> Running (again, v3.0) mdadm --incremental --rebuild-map works rebuilds the map.
> 
> Then using --incremental /dev/nbd0 works (but it's resyncing **again**).
> 
> Does that help?

So: yes it does - thanks.

I've got some coding to do ;-)

NeilBrown

  reply	other threads:[~2008-12-16  1:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15 14:54 behavior different from mdadm 2.6.4 and 3.0? Jon Nelson
2008-12-15 21:11 ` Neil Brown
2008-12-15 21:35   ` Jon Nelson
2008-12-16  1:27     ` Neil Brown [this message]
2008-12-16  2:35       ` Jon Nelson

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=18759.1035.627538.450310@notabene.brown \
    --to=neilb@suse.de \
    --cc=jnelson-linux-raid@jamponi.net \
    --cc=linux-raid@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.