Web-server – Linux web server partitioning: How should I do it

partitionweb-server

I've order a dedicated server which will have 2x1TB hard disks. I'd like a little help though on how I should partition the disks.

Everything will be setup using software raid1 (mdadm) and all of the user data will reside in /home (this includes apache2 website files alongside everything else). I was thinking about something like the following:

  • 4MB bios_grub (since I'll be using a GPT)
  • 1GB /boot (just because – yes I know that it's too much)
  • 50GB / (this will include /usr as well)
  • 740GB /home
  • 50GB /var (logs, mails, others)
  • 150GB /var/lib/mysql (MySQL files)
  • 8GB swap

What do think? I may be assigning less space to /var/lib/mysql since we don't expect to have lot's of MySQL databases (I even think that 10GB will be more than enough for our needs).

What would you change and why?

Best Answer

Consider using LVM - Logical Volume Management. It lets you manage the storage in a flexible way - online resizing of volumes and snapshots and else.

Related Topic