Re: question about mdmon --takeover

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 28, 2013 at 7:14 PM, Francis Moreau <francis.moro@xxxxxxxxx> wrote:
> Hello Neil,
>
>
> Sorry for the late reply.
>
> On Mon, Aug 5, 2013 at 8:59 AM, NeilBrown <neilb@xxxxxxx> wrote:
>> On Wed, 31 Jul 2013 16:30:34 +0200 Francis Moreau <francis.moro@xxxxxxxxx>
>> wrote:
>>
>>> 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 ?
>

and running latest git head is even worse, mdmon can't be started at all:

# mdadm --version
mdadm - v3.3-rc2-58-g2cdd5ce - 28th August 2013

# ls /run/mdadm/
autorebuild.pid  map

# mdmon --takeover /dev/md127
# ps aux | grep dmon
root      2347  0.0  0.0   9680   848 ttyS0    S+   21:40   0:00 grep
--color dmon

# ls /run/mdadm/
autorebuild.pid  map


-- 
Francis
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux