[COLUG] Partiton Size

Rob Funk rfunk at funknet.net
Mon Dec 10 11:17:53 EST 2007


Thomas W. Cranston wrote:
> How much space in MB do I need to give to /boot, /, swap, and home on a
> 10 GB partition?

You forgot /usr and possibly /var.  :-)

But ooh, 10MB is pretty small these days.

I have my basic set of filesystems, and when I set up a new machine I look 
at how much I'm using (not allocated) on each one on other machines.  
Then I try to allocate at *least* twice that on the new machine.

> /boot 100 MB

Depends on how many kernels you want to have installed at once.  It sucks 
to have a kernel upgrade fail because you already have too many kernels 
in /boot.  On the two machines sitting here, one is using 369MB of a 
494MB /boot, and the other is using 34MB of a 61MB /boot.  I like to go 
with half-gig /boot partitions.

These days you can usually get away without a separate /boot, especially 
if your root isn't too huge.

> / ?

Depends on what other partitions you have..... if you split off /var 
and /usr, you can make root pretty small; on one of my machines it's 
1.9GB (506 MB used), and on another it's 464MB (369MB used), 

> swap ? I assume 2x RAM

2x RAM is a decent rule of thumb, but it doesn't have much bearing on 
reality these days.  Unlike some 2.4 kernels and old Unix kernels, the 
current Linux kernel uses swap only as needed, rather than requiring 
twice RAM.  So if you really have enough RAM, you hardly ever use any 
swap, and not much if you do.

On the other hand, Linux has this great "tmpfs" feature that creates a 
really fast filesystem in virtual memory, so the more swap you have, the 
more space can be in your tmpfs filesystems.  On my Ubuntu gutsy systems, 
there are five tmpfs filesystems before even adding /tmp as another one.

> home

Depends on what you'll be doing, but generally it's the biggest you can 
get away with after sizing everything else.


I might start with something like this allocation:

256MB /boot
  1GB /  (has config info, needs to be fairly stable)
2.5GB /var  (most volatile besides /home, can grow large)
  3GB /usr  (fairly fixed size, depends on how much you want to install)
256MB /usr/local  (or /opt or linked to /opt, usually smallish these days)
  2GB /home
  1GB swap
   -- /tmp  (tmpfs, not on disk)

Or, if you want really simple:
1GB swap
9GB /

-- 
==============================|   "A microscope locked in on one point
 Rob Funk <rfunk at funknet.net> |Never sees what kind of room that it's in"
 http://www.funknet.net/rfunk |    -- Chris Mars, "Stuck in Rewind"


More information about the colug432 mailing list