From owner-freebsd-questions@FreeBSD.ORG Wed Aug 22 21:47:11 2007 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 259A216A420 for ; Wed, 22 Aug 2007 21:47:11 +0000 (UTC) (envelope-from mkhitrov@gmail.com) Received: from el-out-1112.google.com (el-out-1112.google.com [209.85.162.176]) by mx1.freebsd.org (Postfix) with ESMTP id C2C1F13C46E for ; Wed, 22 Aug 2007 21:47:10 +0000 (UTC) (envelope-from mkhitrov@gmail.com) Received: by el-out-1112.google.com with SMTP id s27so79339ele for ; Wed, 22 Aug 2007 14:47:10 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bfD+eyjeH/KvN4cIevQkgsCgU7CqbbiD8wYYa/8oYT2otoQjpzIuAoFVni8lreYgJOF+587YX8jDeaJRnO1H3X9Gjfga/0dZFfosLpxcDT2vTBymn2Vq1GsHeckQJRWib3SCHEXZaqNoRFngXyDfx0SRstGuWuxM+Us8/6w1HGY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=VmcPieD0u97NZFTkmZtxaE43flkEKzdZgNIlO1T36JFoWahI66ukf0LpaFFH47PnoCqPM2DrWPv7GvaM3j0bVST2mZqJH1yPHuVRwTL3/s5USVYSeoReVZ/2qLQjIKJF/gYx1wobFpURAEbPL25g0o8H57SJ374Bq7hr+iErvT4= Received: by 10.143.6.1 with SMTP id j1mr146006wfi.1187819229129; Wed, 22 Aug 2007 14:47:09 -0700 (PDT) Received: by 10.143.10.17 with HTTP; Wed, 22 Aug 2007 14:47:09 -0700 (PDT) Message-ID: <26ddd1750708221447o14158e77u45c7727a17ba084@mail.gmail.com> Date: Wed, 22 Aug 2007 17:47:09 -0400 From: "Maxim Khitrov" To: "Brad Waite" In-Reply-To: <56712.67.176.75.179.1187816225.squirrel@webmail.wcubed.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <56712.67.176.75.179.1187816225.squirrel@webmail.wcubed.net> Cc: freebsd-questions@freebsd.org Subject: Re: /var or /usr for data? 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 2007 21:47:11 -0000 On 8/22/07, Brad Waite wrote: > It would appear that the "proper" allocation of filesystems on FreeBSD is > to put all data in /usr. I'm used to this and have been doing it for > years. > > However, there's a few issues that keep coming up. A lot of the ports use > /var for data dirs. MySQL, Qmail, dspam are a few that I've had issues > with. > > Is there a canonical place to put data files on a modern FreeBSD server? > Figuring out the sizes for each partition is an exercise in frustration > when I don't know how big /var or /usr are going to grow. > > For now, I've changed the default config files for MySQL and dspam to use > /usr/local for data dirs, but is this the "right" thing to do? > > I used to put everything on /, but that created problems when I couldn't > fsck the single large partition and I had to boot from CD to fix things. > That's an issue when the server's not in the same state. > > A Solaris associate of mine is of the opinion that /usr should be able to > be mounted RO for security purposes. If /var was the default for all > add-ons and data, I could see that, but that wouldn't work the ways things > are now. I put all the server-related data such as databases, mail, websites, subversion/mercurial repositories under /srv. It's part of the FHS, but I don't think many people use it. You should not be using /usr for this. I think of /usr as the place where software gets installed to (and from), but there shouldn't be your own data under it with the exception of configuration files. If I had to use something other than /srv I would go for /var, but in my opinion that's also messy. Especially so if you have /var/tmp on the same partition. As far as partition sizes go, I tend to follow a rather simple model. I give 1GB to /, even though that's usually an overkill, 2xRAM for swap, 1-4GB for /var depending on what I plan to use the machine for, 5-20GB for /usr (20 is mostly for workstations where you plan to run an X server with many other apps), and the rest either for /srv or /home. For a server I use /srv, for a workstation I use /home. - Max