From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Brown Subject: Re: [mdadm PATCH 5/9] mdmon: mdmon_pid should return pid from either dir Date: Wed, 3 Mar 2010 17:55:54 +1100 Message-ID: <20100303175554.54a91d49@notabene.brown> References: <20100228144123.GA24781@maude.comedia.it> <20100228144340.GD24781@maude.comedia.it> <20100303125031.4ae998cb@notabene.brown> <20100303064403.GB21832@maude.comedia.it> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20100303064403.GB21832@maude.comedia.it> Sender: linux-raid-owner@vger.kernel.org To: Luca Berra Cc: "linux-raid@vger.kernel.org" List-Id: linux-raid.ids On Wed, 3 Mar 2010 07:44:03 +0100 Luca Berra wrote: > On Wed, Mar 03, 2010 at 12:50:31PM +1100, Neil Brown wrote: > >On Sun, 28 Feb 2010 15:43:40 +0100 > >Luca Berra wrote: > > > >> mdmon_pid is called by mdmon_running to check if mdmon is running, so > >> the pid file should be checked in either VAR_RUN or ALT_RUN > > > >I don't agree with this. > > > >The only time that any code should care about ALT_RUN is when mdmon is > >starting. It chooses VAR_RUN or ALT_RUN to use, and possibly looks for an > >old instance to kill. > > > >When starting mdmon without "--takeover", if it decided to use VAR_RUN, it > >would not check ALT_RUN to see if an old mdmon was running. So I have > >replaced you patch with a patch to include that extra check when starting > >mdmon without --takeover. > >Maybe that is the case you intended to address?? > > No, > the problem i try to address is in mdadm, not mdmon > When mdadm needs to manage arrays with external metadata it will look > for mdmon using mdmon_running(). If mdmon is running but did not yet > take over mdadm will refuse to operate stating that mdmon is not > running. > > I had to mount --bind ALT_RUN VAR_RUN in order to repair my imsm on > sunday morning. Ahhh.. I would rather you did mdmon --takeover --all which would effectively move the key fines from ALT_RUN to VAR_RUN. Would that have worked in your case? NeilBrown