Wednesday, March 25, 2015

linux - Debian - What is the purpose of splitting root folder into separate partitions?












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?


Answer



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.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...