Alright, so am building a webserver that will be using mysql, nginx, php, and a few other things. I expect the database to grow quote large and there will be many small files that will be served by the webserver, less than 1-2mb downloads. I have two 1.5 tb sata HDD's and 350 gig sata hdd, the mobo has enough sata ports to plug them all in.

I'm looking for some advice on how to partition this thing. I am using cfdisk. If its just going to be a webserver, do I need a large /home directory? I want to use a different faster fs for the /var dir as per the archlinux recommends. I'm not exactly sure where nginx or apache will store the files. So do I need a larger root directory? I know in arch the webserver files are locate in /srv plus I will eventually have a large database.

I wouldn't even mind a raid setup using the two 1.5 tb hdds and then using the 350gig hdd for the os. Any recommendations on how to partition everything?



You can configure all of those services to store files wherever you want to, just by changing the relevant configuration files. So basically it's up to you, and you can always change it later on.

Most of the reason that distributions will recommend using a separate partition for /var, is that /var tends to contain folders of files which change a lot (variable) – and the risk is that if these grow very large and share the / filesystem, then you'll have trouble logging in to fix the disk space problem. In practice this isn't a massive issue, as if you can login with the 'root' user, you'll have some space reserved on the disk anyway for administration purposes.

Just go with whatever you feel is right for the purposes. Since you've got two disks to use for RAID, why not put the files you'd worry about losing the most onto the RAID array to ensure yourself some data redundancy, you can always change things round later on, even though it's sometimes a bit of effort to actually make this happen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.