[plug] Debian - how many partitions?

Craig Ringer craig at postnewspapers.com.au
Tue Sep 17 17:32:26 WST 2002


> It has dawned on me as I read your replies that you can have a "main"
> partition (for want of a better adjective) and a swap partition, ie 2
> partitions in total, or you can have just about one separate partition for
> each of the root directories: usr,  var,  etc,  swap,  ...etc ... 

Don't put /etc on a separate partiton - most un-fun as /etc/fstab must 
be findable to mount filesystems including /etc. You could do it with a 
wrapper around /sbin/init - but don't go there unless you have to.

Other dirs that must be on / are /bin and /sbin. Pretty much anything 
else can be offloaded, but it depends on what you're doing whether its 
worth it.

> I think
> this is because under Linux you can mount any device or partition anywhere
> in the directory tree .... is that correct?

Yeah. Cool, eh?

> So, my main question is .... if you have a pretty big disk, what is better:

There's no absolute "better" here. All-in-one gives more flexibility and 
more efficient disk usage, but many partitions allows better security 
(mount /usr read-only, mount /home noexec, etc), easier distro changes 
if you want to, better handling of out-of-disk-space conditions (when 
/var or /home fill up, /tmp is still writeable - this is a good thing). 
In the end, I usually go for a big / with only /var and /home on 
separate partitions now. On smaller disks or systems where /var won't 
contain much (no databases, etc) I'll sometimes put /var and /home on a 
single filesystem which can be done using bind mounts.

In the end its up to you. You can even have a linux install on _one_ 
filesystem if you're willing to use a swap file not a swap partition 
(not reccomended due to races, inefficiency)

Craig Ringer




More information about the plug mailing list