Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Sell partitioning to me

Actually, my whole / folder is into a single partition.

So what is the purpose of putting, for instance, the /var/log folder or the /home folder into an other partition on the same hard drive?

Are there any performance gains, or is this just for maintenance purposes?

share|improve this question

marked as duplicate by Zoredache, voretaq7, Scott Pack, mattdm, jscott Jan 26 '11 at 16:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Oh, I see. Thx for the advice Zoredache. – Jonathan Rioux Jan 26 '11 at 15:50
Also see… – Zoredache Jan 26 '11 at 17:14
up vote 2 down vote accepted

The Center for Internet Security (CIS) Debian Benchmark recommends placing the following directories on their own partitions:

  • /home
  • /tmp
  • /var
  • /opt

And optionally

  • /var/tmp
  • /var/log
  • /var/spool/mail
  • /var/cache/apt/archives

From a security standpoint this can help prevent users from doing things such as filling up partitions, depleting the inode pool, etc. From a functional standpoint, it can help you grow partitions only where needed as you find a need for more space. It also gives you the flexibility of placing partitions on different devices, such as /home on a network volume, or /var on fast storage.

share|improve this answer
Thanks for the partitionning recommandations. – Jonathan Rioux Jan 26 '11 at 16:00

A few reasons come to mind...

  • Excessive log volume will only fill /var, allowing other processes to get the space they need in places like /tmp

  • Better control of mount options. (ie: nosuid on /home filesystem )

  • More flexibility for partitions and filesystems (ie: multiple Linux OSes, followed by a RAID1 /home )

I typically just do '/', '/var', and '/home'. Personally, I'm very strict about /home in particular, so it's easy to differentiate my userdata from everything else.

share|improve this answer
  1. Keeping one full directory from impacting other parts of the system. A separate /home means a user gone wild isn't going to impact /var, /usr, or other system directories.

  2. Backups. The fifth field in /etc/fstab can be used to choose whether the filesystem would be dumped by the dump command. Separate partitions means you can choose individually which to back up.

share|improve this answer
/home and /tmp are probably most common since non-root users can write there by default. /var or /var/log is common since logs can fill up the FS. There's no hard, fast rule about it, so it's a good idea to think along the lines of "what's the risk and impact of /some/directory filling up?" – Cakemox Jan 26 '11 at 15:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.