1

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?

2

3 Answers 3

2

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.

0
3

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.

1
  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.

1
  • 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, 2011 at 15:55

Not the answer you're looking for? Browse other questions tagged .