From owner-freebsd-questions Tue Oct 8 0:55: 4 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DAE837B401 for ; Tue, 8 Oct 2002 00:55:03 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0CBF043E4A for ; Tue, 8 Oct 2002 00:55:02 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id g987suVc013437; Tue, 8 Oct 2002 08:54:56 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.6/8.12.6/Submit) id g987spUE013436; Tue, 8 Oct 2002 08:54:51 +0100 (BST) Date: Tue, 8 Oct 2002 08:54:51 +0100 From: Matthew Seaman To: Christopher Smith Cc: questions@FreeBSD.ORG Subject: Re: Use MFS for /tmp, etc ? Message-ID: <20021008075451.GA10638@happy-idiot-talk.infracaninophi> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-Spam-Status: No, hits=-14.1 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_01_02, USER_AGENT,USER_AGENT_MUTT version=2.41 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Oct 08, 2002 at 12:37:05PM +1000, Christopher Smith wrote: > What's the consensus for using an MFS filesystem for places like /tmp. > /var/tmp, /var/run, etc ? I see in some oldish postings to -questions this > is considered a bad idea, does this still apply in more recent versions of > FreeBSD (4.6.2) ? Using mfs for /tmp works very well. I wouldn't use it for /var/tmp or /var/run though -- files in /var/tmp are meant to persist across reboots. /var/run is far too small to bother mounting as a separate partition, and having it as a mfs won't give you any apreciable perfomance advantage. If you do use mfs on your /tmp partition, there are a few gotchas: i) *Always* use the '-s nnnnnn' mount option to limit how much memory the mfs will use up. Otherwise, there's a very easy denial of service attack that can use up all your memory+swap The argument to -s is given in sectors: that's multiples of 512 bytes by default. ii) Don't mount /tmp noexec and expect to be able to do a 'make buildworld' or to be able to build a number of ports. The 'nosuid', 'nodev' and 'nosymfollow' options are useful security enhancements though. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message