From owner-freebsd-rc@FreeBSD.ORG Mon Mar 4 20:58:23 2013 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D235D606 for ; Mon, 4 Mar 2013 20:58:23 +0000 (UTC) (envelope-from lkchen@k-state.edu) Received: from ksu-out.merit.edu (ksu-out.merit.edu [207.75.117.133]) by mx1.freebsd.org (Postfix) with ESMTP id 9FADF14AE for ; Mon, 4 Mar 2013 20:58:23 +0000 (UTC) X-Merit-ExtLoop1: 1 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgEFAJ0JNVHPS3TT/2dsb2JhbABEFoY6vQ4Wc4IfAQEBBAECIGIPGAICDRkCIwcvGRuHZgMPDKEajlWIXw1MiDqBI4sifBUGg2WBEwOIbIseXY0zhRiDJoFLCRce X-IronPort-AV: E=Sophos;i="4.84,781,1355115600"; d="scan'208";a="75974386" X-MERIT-SOURCE: KSU Received: from ksu-sfpop-mailstore02.merit.edu ([207.75.116.211]) by sfpop-ironport01.merit.edu with ESMTP; 04 Mar 2013 15:58:16 -0500 Date: Mon, 4 Mar 2013 15:58:16 -0500 (EST) From: "Lawrence K. Chen, P.Eng." To: freebsd-rc@freebsd.org Message-ID: <1069563317.22488674.1362430696968.JavaMail.root@k-state.edu> In-Reply-To: Subject: Re: mountlate being too mount-happy MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [129.130.0.181] X-Mailer: Zimbra 7.2.2_GA_2852 (ZimbraWebClient - GC25 ([unknown])/7.2.2_GA_2852) X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Mar 2013 20:58:23 -0000 ----- Original Message ----- > On 22 January 2013 21:30, Chris Rees wrote: > > On 22 January 2013 21:16, Hiroki Sato wrote: > >> Chris Rees wrote > >> in > >> : > >> > >> ut> [dragging it up again!] > >> ut> > >> ut> On 18 November 2012 14:28, Chris Rees > >> wrote: > >> ut> > On 18 November 2012 06:09, Hiroki Sato > >> wrote: > >> ut> >> Mateusz Guzik wrote > >> ut> >> in <20121118002245.GB15055@dft-labs.eu>: > >> ut> >> > >> ut> >> mj> On Sun, Nov 18, 2012 at 07:43:25AM +0900, Hiroki Sato > >> wrote: > >> ut> >> mj> > Chris Rees wrote > >> ut> >> mj> > in < > >> ut> > >> CADLo839wqzAPenuQDOVpQ74yjCMkPQNceKpvs_N9XNwMLrkC1A@mail.gmail.com>: > >> ut> >> mj> > > >> ut> >> mj> > ut> On 2 November 2012 14:21, Eitan Adler > >> > >> ut> wrote: > >> ut> >> mj> > ut> > On 2 November 2012 09:56, Chris Rees > >> > >> ut> wrote: > >> ut> >> mj> > ut> >> I'll take a look. > >> ut> >> mj> > ut> > > >> ut> >> mj> > ut> > untested: > >> ut> >> mj> > ut> > >> ut> >> mj> > ut> Based on Eitan's patch, I've tested this one, and > >> documented > >> ut> it in mount(8) too: > >> ut> >> mj> > ut> > >> ut> >> mj> > ut> > >> http://www.bayofrum.net/~crees/patches/mountonlylate.diff > >> ut> >> mj> > ut> > >> ut> >> mj> > ut> Does anyone have any suggestions/objections/urge > >> to approve it? > >> ut> >> mj> > > >> ut> >> mj> > Is the original problem due to backgrounding of NFS > >> mount only? If > >> ut> >> mj> > so, implementing prevention of duplicate invocation > >> into mount(8) > >> ut> >> mj> > would be more reasonable, I think. > >> ut> >> mj> > > >> ut> >> mj> > >> ut> >> mj> We have 2 distinct scripts that try to mount same set > >> of filesystems. > >> ut> >> mj> I think this is the real bug here and proposed patches > >> makes it go > >> ut> away in > >> ut> >> mj> an IMHO acceptable way. > >> ut> >> > >> ut> >> I just wanted to make sure if the case is limited to > >> background NFS > >> ut> >> mount or not. > >> ut> >> > >> ut> >> rc.d/mountlate just tries to mount the filesystems that are > >> not > >> ut> >> mounted yet at that time in addition to the "late" ones, > >> not always > >> ut> >> to mount the same set twice. If it is a bug, it is better > >> to simply > >> ut> >> fix -l to exclude not-yet-mounted ones without "late" > >> keyword than > >> ut> >> adding another option. > >> ut> > > >> ut> > I don't think it's a bug as such-- -l option is clearly > >> labelled in > >> ut> > the manpage (emphasis mine): > >> ut> > > >> ut> > When used in conjunction with the -a option, *also* mount > >> those > >> ut> > file systems which are marked as ``late''. > >> ut> > > >> ut> > I think that for POLA and to avoid changing behaviour of an > >> option > >> ut> > that's been there a long time we need the -L option. > >> ut> > > >> ut> > I disagree with Mateusz here-- split operations in rc makes > >> two > >> ut> > scripts necessary; mount and mountlate are two separate > >> operations, > >> ut> > done at different times. > >> ut> > >> ut> Hiroki-san, do you still believe that changing the behaviour > >> of -l is the > >> ut> correct way to go, rather than add a -L option for only late > >> filesystems? > >> ut> (mount -la currently mounts *all* filesystems, you suggested > >> to change to > >> ut> just late). > >> ut> > >> ut> I'd like to fix this, but I want to make sure you're happy > >> with the > >> ut> solution. > >> > >> Sorry for being unresponsive. Can you give me a couple of days > >> to > >> double-check the behavior? > > > > That'd be fantastic, thank you. > > > > Ping? > > :) > > Chris Hmmm, I forgot about this annoyance....had two problems with mountlate....it runs too early (only like a couple of rc scripts after the first mount) and the nfs background issue. I mount nfs filesystems from a VM on my FreeBSD system, so mountlate needs to come sufficiently after the VM starts. Making the VM startup be "BEFORE: mountlate" caused some other problem that I forget. Now that I think of it, it wonder if there's something that depends on /compat/linux/proc and/or /compat/linux/sys...but doesn't specify it in its rc script. And, using nfs background would cause them to happen twice. I ended up taking the nfs mounts out of fstab and doing the nfs background mounts in rc.local. Lawrence