Thread (9 messages) 9 messages, 2 authors, 2013-09-02

Re: question about mdmon --takeover

From: Francis Moreau <hidden>
Date: 2013-08-28 17:14:41

Hello Neil,


Sorry for the late reply.

On Mon, Aug 5, 2013 at 8:59 AM, NeilBrown [off-list ref] wrote:
On Wed, 31 Jul 2013 16:30:34 +0200 Francis Moreau [off-list ref]
wrote:
quoted
Hello list,

I thought that using "--takeover" would hint mdmon to replace existing
mdmon process, and therefore the old one would exit somehow.

However after several "mdmon --takeover" I can see this:
 $ ps aux | grep dmon
root       233  0.0  0.2  80388 10752 ?        SLsl 14:02   0:00 @dmon
--offroot md127
root      3326  0.0  0.2  14920 10820 ?        SLsl 15:16   0:00 mdmon
--takeover md127
root      3343  0.0  0.2  14920 10820 ?        SLsl 15:17   0:00 mdmon
--takeover md127

Is this expected ?

Thanks.
Nope.  That's not expected.

mdmon should send SIGTERM to the old mdmon and then wait for it to exit.

If the new and old mdmon were compiled different and look for the pid file in
different directories that might explain what you see.

If you compile mdadm from source it will use /run/mdadm.  However if your
distro doesn't have /run the the distro-provided mdadm will be compiled
differently.
It doesn't to be the case.

Actually sending SIGTERM manually to mdmon has no effects.


# mdadm --version
mdadm - v3.2.6 - 25th October 2012

# ps aux | grep dmon
root       235  0.1  1.0  80612 10976 ?        SLsl 19:08   0:00 @dmon
--offroot md127
root       339  0.0  1.0  15044 10944 ?        SLsl 19:08   0:00
/sbin/mdmon --takeover md127

# cat /run/mdadm/md127.pid
339

# kill -SIGTERM 339
# ps aux | grep dmon
root       235  0.0  1.0  80612 10976 ?        SLsl 19:08   0:00 @dmon
--offroot md127
root       339  0.0  1.0  15044 10944 ?        SLsl 19:08   0:00
/sbin/mdmon --takeover md127

# ps aux | grep dmon
root       235  0.0  1.0  80612 10976 ?        SLsl 19:08   0:00 @dmon
--offroot md127
root       339  0.0  1.0  15044 10944 ?        SLsl 19:08   0:00
/sbin/mdmon --takeover md127
root      2352  0.1  1.0  15076 10976 ?        SLsl 19:12   0:00 mdmon
--takeover /dev/md127

# cat /run/mdadm/md127.pid
2352

# pkill -SIGTERM mdmon
[root@localhost ~]# ps aux | grep dmon
root       235  0.0  1.0  80612 10976 ?        SLsl 19:08   0:00 @dmon
--offroot md127
root       339  0.0  1.0  80580 10944 ?        SLsl 19:08   0:00
/sbin/mdmon --takeover md127
root      2352  0.0  1.0  80612 10976 ?        SLsl 19:12   0:00 mdmon
--takeover /dev/md127

Can't you reproduce ?

Thanks
-- 
Francis
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help