From owner-freebsd-questions@FreeBSD.ORG Wed Aug 22 22:21:17 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 934AF10656D2 for ; Wed, 22 Aug 2012 22:21:17 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx1.freebsd.org (Postfix) with ESMTP id 21B538FC1B for ; Wed, 22 Aug 2012 22:21:16 +0000 (UTC) Received: by wibhr14 with SMTP id hr14so115660wib.13 for ; Wed, 22 Aug 2012 15:21:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; bh=8GT9b9HXJI/MMn7M2zlFjpmzSPuyuaBIsnSNJb/VZeg=; b=WXEs1xnNGUHVTBvNAvZQLlcnYPQObsILroapQzskECfOLuJuKA7XO4rqM3x7flXmBb k65h6QWimftRwkMKnFtKYdEDHvOWKrdeHl10tgjBWOwzIp1TK3qEaY9s6O6aIIojDQxX LnwGJ3heKnIFjItn0AcDyuf8RSlpJnNHLWaJVnkHk5n5f+pmYrcIRDzRlSY9zbEwzzeN Nw4/AI3M9lZaAD3VCV4pT5yayIHI+j/pi4BpQQq1XoBYrMpx7Ktt1ecPmRr7SDXG9y6E lFdFi8f9n7KaLp6+VJDjzp09+KHXNVePi7bBvEXsr4aZ1iVd/U14fqoWIhmqEjJFKA9R q+Yw== Received: by 10.216.232.32 with SMTP id m32mr2404680weq.186.1345674075774; Wed, 22 Aug 2012 15:21:15 -0700 (PDT) Received: from gumby.homeunix.com (87-194-105-247.bethere.co.uk. [87.194.105.247]) by mx.google.com with ESMTPS id r9sm6258583wia.2.2012.08.22.15.21.13 (version=SSLv3 cipher=OTHER); Wed, 22 Aug 2012 15:21:14 -0700 (PDT) Date: Wed, 22 Aug 2012 23:21:12 +0100 From: RW To: freebsd-questions@freebsd.org Message-ID: <20120822232112.07ac3517@gumby.homeunix.com> In-Reply-To: References: <201208221934.q7MJYfwM063804@mail.r-bonomi.com> <1345664911.2501.8.camel@z6000.lenzicasa> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.6; amd64-portbld-freebsd8.3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: /tmp filesystem full X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 22:21:17 -0000 On Wed, 22 Aug 2012 14:14:17 -0700 Michael Sierchio wrote: > This will happen automatically if you go to multiuser without a > writeable /tmp. See /etc/rc.d/tmp It doesn't, the default is an old-fashioned md device, not tmpfs. > I have a problem with the semantics of the rc scripts for this and > var, though - if you are going to use a memory-backed filesystem, you > should reserve all the space at the outset. It defaults to 20MB. There's no such thing as an unlimited md-backed device > "Bad things" can occur as > you approach the memory limit (like a kernel panic) otherwise. Provided that you have swap you can have a /tmp that's much bigger than memory with either md or tmpfs. > I'd prefer something like this: > > _mdunit=`mdconfig -a -n -t malloc -o reserve -s ${tmpsize}` It's a bad idea to use a malloc device as it uses wired kernel memory, the default allows the files to be written out to swap rather than panic the kernel. > newfs /dev/md${_mdunit} > /dev/null 2>&1 > mount -o ${tmpmfs_flags} /dev/md${_mdunit} /tmp > > But that's just me. mount_md doesn't quite do this.