From owner-freebsd-stable@FreeBSD.ORG Mon Oct 10 15:09:18 2005 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4DEB216A41F for ; Mon, 10 Oct 2005 15:09:18 +0000 (GMT) (envelope-from sean@gothic.net.au) Received: from visi.gothic.net.au (visi.gothic.net.au [202.182.72.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C45143D46 for ; Mon, 10 Oct 2005 15:09:17 +0000 (GMT) (envelope-from sean@gothic.net.au) Received: from localhost (localhost [127.0.0.1]) by visi.gothic.net.au (Postfix) with ESMTP id BEA61264BE; Tue, 11 Oct 2005 01:09:14 +1000 (EST) Received: from localhost ([127.0.0.1]) by localhost (visi.gothic.net.au [127.0.0.1]) (amavisd-new, port 10026) with SMTP id 29774-09; Tue, 11 Oct 2005 01:09:09 +1000 (EST) Received: from [10.99.34.213] (home.winn.id.au [202.182.72.30]) by visi.gothic.net.au (Postfix) with ESMTP id B2075264AC; Tue, 11 Oct 2005 01:09:08 +1000 (EST) Message-ID: <434A8411.7020605@gothic.net.au> Date: Tue, 11 Oct 2005 01:09:05 +1000 From: Sean Winn User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lowell Gilbert References: <20051010020729.GA56351@bunrab.catwhisker.org> <44r7atwkjm.fsf@be-well.ilk.org> In-Reply-To: <44r7atwkjm.fsf@be-well.ilk.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at gothic.net.au Cc: stable@freebsd.org Subject: Re: 5.x: how do I get a *swap*-backed /tmp via rc.conf? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Oct 2005 15:09:18 -0000 Lowell Gilbert wrote: > David Wolfskill writes: > > >>I made the somewhat unexpected discovery that in FreeeBSD 5-STABLE, >>if I use the "tmp*" variables in /etc/rc.conf to have an MFS /tmp >>created, it is apparentyly not swap-backed -- as I expected from >>the part of the mdmfs man page that reads: >> >> By default, mdmfs creates a swap-based (MD_SWAP) disk with soft-updates >> enabled and mounts it on mount-point. >> >>and a review of the way mdmfs is invoked by /etc/rc; rather, it appears >>to be malloc-backed. >> >>Here's what's in /etc/{defaults/,}rc.conf about it on one such machine: >> >>g1-59(5.4-S)[42] grep tmp /etc/{default*/,}rc.conf >>/etc/defaults/rc.conf:tmpmfs="AUTO" # Set to YES to always create an mfs /tmp, NO to never >>/etc/defaults/rc.conf:tmpsize="20m" # Size of mfs /tmp if created >>/etc/defaults/rc.conf:tmpmfs_flags="-S" # Extra mdmfs options for the mfs /tmp >>/etc/defaults/rc.conf:isdn_traceflags="-f /var/tmp/isdntrace0" # Flags for isdntrace >>/etc/defaults/rc.conf:clear_tmp_enable="NO" # Clear /tmp at startup. >>/etc/rc.conf:tmpmfs="YES" >>/etc/rc.conf:tmpsize="512m" >>/etc/rc.conf:tmpmfs_flags="-i4096" >>g1-59(5.4-S)[43] >> >>And: >> >>g1-59(5.4-S)[43] sudo mdconfig -l -u md0 >>md0 malloc 524288 KBytes >>g1-59(5.4-S)[44] >> >>Oh, for some sense of what we're working with: >> >>g1-59(5.4-S)[44] uname -a >>FreeBSD g1-59.catwhisker.org. 5.4-STABLE FreeBSD 5.4-STABLE #6: Sun Oct 9 06:24:17 PDT 2005 root@g1-59.catwhisker.org.:/usr/obj/usr/src/sys/LAPTOP i386 >>g1-59(5.4-S)[45] >> >>So, back to my original question: how do I get a *swap*-backed /tmp? >> >>[The way I was alerted to the possibliity that my /tmp might not >>be swap-backed is that I was using a machine running 5-STABLE as a CVS >>server, in order to update /usr/ports on another machine. That's why I >>have the -i4096 argument in there, BTW: to double the number of inodes >>for when the CVS server starts consuming them with wild abandon as it >>builds an isomorphic hierarchy to /usr/ports in /tmp. I think it only >>took me 3 panics before I poked around in the mailing list archives and >>noted scottl's comment about using a swap-backed /tmp instead, which got >>me wondering what backing store my /tmp was using. I did look at >>/etc/rc.d/tmp, as well a /etc/rc.subr, but I'm still failing to see why >>I'm getting a malloc-backed /tmp. FWIW, although the /tmp in question >>is an MFS in 4.x, I do this (use the box as a CVS server for /usr/ports) >>without problem on 4.x.] > > > > It's hard-coded into rc_subr. > Changing it to a default parameter and overriding it in rc.conf would > probably be easy to get committed. Probably really easy, seeing it's already done for RELENG_6 after being implemented in CURRENT. http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/defaults/rc.conf?rev=1.259&content-type=text/x-cvsweb-markup > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >