* behavior different from mdadm 2.6.4 and 3.0?
@ 2008-12-15 14:54 Jon Nelson
2008-12-15 21:11 ` Neil Brown
0 siblings, 1 reply; 5+ messages in thread
From: Jon Nelson @ 2008-12-15 14:54 UTC (permalink / raw)
To: LinuxRaid
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.
--
Jon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: behavior different from mdadm 2.6.4 and 3.0?
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
0 siblings, 1 reply; 5+ messages in thread
From: Neil Brown @ 2008-12-15 21:11 UTC (permalink / raw)
To: Jon Nelson; +Cc: LinuxRaid
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?
Thanks,
NeilBrown
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: behavior different from mdadm 2.6.4 and 3.0?
2008-12-15 21:11 ` Neil Brown
@ 2008-12-15 21:35 ` Jon Nelson
2008-12-16 1:27 ` Neil Brown
0 siblings, 1 reply; 5+ messages in thread
From: Jon Nelson @ 2008-12-15 21:35 UTC (permalink / raw)
To: Neil Brown; +Cc: LinuxRaid
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)
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?
>
> Thanks,
> NeilBrown
>
--
Jon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: behavior different from mdadm 2.6.4 and 3.0?
2008-12-15 21:35 ` Jon Nelson
@ 2008-12-16 1:27 ` Neil Brown
2008-12-16 2:35 ` Jon Nelson
0 siblings, 1 reply; 5+ messages in thread
From: Neil Brown @ 2008-12-16 1:27 UTC (permalink / raw)
To: Jon Nelson; +Cc: LinuxRaid
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: behavior different from mdadm 2.6.4 and 3.0?
2008-12-16 1:27 ` Neil Brown
@ 2008-12-16 2:35 ` Jon Nelson
0 siblings, 0 replies; 5+ messages in thread
From: Jon Nelson @ 2008-12-16 2:35 UTC (permalink / raw)
To: Neil Brown; +Cc: LinuxRaid
On Mon, Dec 15, 2008 at 7:27 PM, Neil Brown
> 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.
>> Does that help?
>
> So: yes it does - thanks.
Awesome!
> I've got some coding to do ;-)
I'm sorry to be causing you more work.
--
Jon
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-12-16 2:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2008-12-16 2:35 ` Jon Nelson
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.