Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jan 2010 09:07:16 -0800
From:      Jeremy Chadwick <freebsd@jdc.parodius.com>
To:        freebsd-stable@freebsd.org
Subject:   Re: 8.0-RELEASE -> -STABLE and size of /
Message-ID:  <20100122170716.GA75020@icarus.home.lan>
In-Reply-To: <a0fb7121676fe0c33302c1653d68e3ac@localhost>
References:  <20100122162155.GG3917@e-Gitt.NET> <a0fb7121676fe0c33302c1653d68e3ac@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jan 22, 2010 at 05:27:52PM +0100, Marian Hettwer wrote:
> Hi All,
> 
> On Fri, 22 Jan 2010 17:21:56 +0100, Oliver Brandmueller <ob@e-Gitt.NET>
> wrote:
> > Hi,
> > 
> > I just noticed somthing: I setup an 8.0-RELEASE amd64 box, / is default
> > 512M. First step after setup was to csup to RELENG_8 and buildkernel and
> > buildworld (no custom kernel, no make.conf).
> > 
> > Instaling the new kernel failed, since /boot/kernel/ is already well
> > over 230 MBytes in size. moving that to kernel.old and writing a new one
> > with about the same size fails due to no space left on device.
> > 
> > This is not a question; I do know how to get around this and how to
> > configure custom kernels so they are a fragment of that size afterwards.
> > However, I think this is a clear POLA violation. So, either GENERIC with
> > less debugging information (symbols and stuff), which makes debugging
> > harder or setting a higher default for / would be options, if not anyone
> > else has better ideas.
> >
> +1 vote for making / bigger. 
> At least a size where a make installkernel runs through. 
> 
> I like FreeBSD because it honors POLA.
> And as Oliver stated, this is a clear POLA violation.

I'd like to see the default root filesystem size default to 1GB.  For
most folks this works well.  If people are paranoid, 2GB should be more
than sufficient.


While I'm here, I figure I'd share how I end up partitioning most of the
server systems I maintain.  I use this general "formula" when building a
new system, unless it's a 4-disk box (see bottom of mail):

ad4s1a = /    = UFS2    = 1GB
ad4s1b = swap           = (2*RAM) or (2*MaxRAMPossible)
ad4s1d = /var = UFS2+SU = 16GB  (mandatory: must be >= 2*RAM)
ad4s1e = /tmp = UFS2+SU = (2*RAM)
ad4s1f = /usr = UFS2+SU = 16GB

There's lots of leftover space on the disk of course -- for either
ad4s1g or ad4s2. 
 
For 1-disk boxes, I add ad8s1g = /home = UFS2+SU = <remaining space>,
or sometimes name it /storage (depends on the role of the box).

For 2-disk boxes, I almost always go with disks that are identical in
size, use the above formula, and add ZFS mirroring as so:

ad4s2  = ZFS mirror pool  = <remaining space>
ad6    = ZFS mirror pool  = <entire disk>

Then /home or /storage are ZFS filesystems in that pool.  Folks will say
"but that means you're losing/wasting gigs of space on ad6, since the
mirror size is based on the smallest pool member!"  Yep, but I consider
the trade off easily worth it.  Given the size of disks today (500GB to
2TB), I really don't stress about it:

Wasted space for 4GB RAM systems: 1 + 2*4 + 16 + 2*4 + 16 = 49GB
Wasted space for 8GB RAM systems: 1 + 2*8 + 16 + 2*8 + 16 = 65GB

If the machine is 4-disk, I use a slightly modified formula:

ad4s1a = /      = UFS2    = 1GB
ad4s1b = swap             = (2*RAM) or (2*MaxRAMPossible)
ad4s1d = /var   = UFS2+SU = 16GB  (mandatory: must be >= 2*RAM)
ad4s1e = /tmp   = UFS2+SU = (2*RAM)
ad4s1f = /usr   = UFS2+SU = 16GB
ad4s1g = /spare = UFS2+SU = <remaining space>
ad6    = ZFS raidz1 pool  = <entire disk>
ad8    = ZFS raidz1 pool  = <entire disk>
ad10   = ZFS raidz1 pool  = <entire disk>

The ad4s1g part might seem silly, but I've found it useful.  If a
filesystem like /var goes awry (usually if bad blocks exist on the disk
where that filesystem lies), you can temporarily work around it by
rsync'ing as much data over to /spare, then remount /spare as /var to
avoid use of the sectors involved in ad4s1d.  I've had to do this on two
separate occasions.

There are network backups for all the boxes, so I don't OCD about it all
too much.  :-)

-- 
| Jeremy Chadwick                                   jdc@parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100122170716.GA75020>