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?

Jonathan Rioux
  • 1,878
  • 6
  • 33
  • 57

3 Answers3

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.

pboin
  • 1,086
  • 8
  • 11
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.

Scott Pack
  • 14,717
  • 10
  • 51
  • 83
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.

Cakemox
  • 24,141
  • 6
  • 41
  • 67
  • 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