Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 serverfault.com/questions/1145/… –  Zoredache Jan 26 '11 at 17:14
add comment

3 Answers

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
add comment

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
add comment
  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
1  
/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
add comment

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