From owner-freebsd-current@FreeBSD.ORG Thu Jul 29 16:33:08 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAC3A1065676 for ; Thu, 29 Jul 2010 16:33:08 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (m209-73.dsl.rawbw.com [198.144.209.73]) by mx1.freebsd.org (Postfix) with ESMTP id 889A68FC15 for ; Thu, 29 Jul 2010 16:33:08 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.4/8.14.4) with ESMTP id o6TGFJQU046526; Thu, 29 Jul 2010 09:15:19 -0700 (PDT) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.4/8.14.4/Submit) id o6TGFJ8G046525; Thu, 29 Jul 2010 09:15:19 -0700 (PDT) (envelope-from david) Date: Thu, 29 Jul 2010 09:15:19 -0700 From: David Wolfskill To: gahn Message-ID: <20100729161519.GK12818@albert.catwhisker.org> References: <701277.97445.qm@web52303.mail.re2.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k2+Bt23KD9VIuFWa" Content-Disposition: inline In-Reply-To: <701277.97445.qm@web52303.mail.re2.yahoo.com> User-Agent: Mutt/1.4.2.3i Cc: free bsd Subject: Re: /tmp and swap space X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 16:33:08 -0000 --k2+Bt23KD9VIuFWa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 29, 2010 at 08:35:30AM -0700, gahn wrote: > hi all: >=20 > is it possible to create /tmp directory under swap space? Certainly; case in point: localhost(9.0-C)[4] uname -v FreeBSD 9.0-CURRENT #71 r210558M: Wed Jul 28 07:46:04 PDT 2010 root@loc= alhost:/usr/obj/usr/src/sys/CANARY=20 localhost(9.0-C)[5] df -h /tmp Filesystem Size Used Avail Capacity Mounted on tmpfs 2.0G 12K 2.0G 0% /tmp localhost(9.0-C)[6]=20 > under solaris, it is automatically created under swap unless one specific= ally instructs the system not to do so.. Quite so. What I do -- both in CURRENT as well as stable/7 and stable/8 -- is: localhost(9.0-C)[6] grep tmpfs /etc/fstab tmpfs /tmp tmpfs rw,size=3D2g 0 0 localhost(9.0-C)[7]=20 Note: doing this causes a message: WARNING: TMPFS is considered to be a highly experimental feature in FreeBSD. to be issued. That said, I've been using it quite a bit in the last couple of months, and have never had an issue with it of which I'm aware. The way I used to set up swap-backed /tmp was to have the following in /etc/rc.conf: # tmpmfs=3D"YES" # tmpsize=3D"2048m" # tmpmfs_flags=3D"-i4096 -o async" (but since I'm now using tmpfs, I commented the above out in /etc/rc.conf). Peace, david (a fan of swap-backed /tmp) --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --k2+Bt23KD9VIuFWa Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAkxRqRYACgkQmprOCmdXAD05dQCfRpX5dyqVwn0UouQ0C/rHBj9m zY4AnAq4gBH7VedIWKFl54kmPsfLW4pV =NgUv -----END PGP SIGNATURE----- --k2+Bt23KD9VIuFWa--