1

Folks, how would you recommend to partition a server disk? Server would operate under FreeBSD, with primary use as a web-app server(i.e. apache, mysql, php) for multiple applications/websites.

Disks are organized into RAID1

2 Answers 2

2

Partitioning disks is useful for improving performance, isolating fault, and improving security. Of these, fault isolation is the only part that's really important these days.

Fault isolation: Unix behaves poorly when a filesystem fills up. Many programs assume that a write succeeds, and they usually do, unless the filesystem is full. All kinds of terrible things start happening when you fill the FS, so you want to think about what is writing where and how bad it is if that FS fills up.

Security: If I can read a directory and I can write to a directory anywhere in that filesystem, I can create a hardlink to the files in that directory. A fun practical joke was to write a script that reads through another user's home directory and hardlink everything there to a directory in your home directory. After a while, that other user would run out of quota because they wouldn't be able to delete any of their own files. These days where computers aren't really doing real timesharing, this sort of issue isn't really a concern.

Performance: if you've got lots of disks of wildly different speeds, you can put different data on different spindles to optimize for how the data will be used. Likely not interesting in today's absurdly fast disks and raids that obscure these sorts of concerns.

Lastly, there may be other domain specific issues with partitioning. For instance, maybe an os can't boot from a specific type of filesytem, or you want to encrypt one filesystem but not others, and so on.

2

I would probably have separate volumes at the following mount points:

  • /
  • /usr/local/www or your apache DocumentRoot
  • /var/log
  • /var/db/mysql or your mysql db root

You must log in to answer this question.

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