I'm wondering and I'm sure that many out there are wondering also, on which would be the best or at least the optimal file system layout for a GNU/Linux based server. I'm aware that there is no general layout, because layouts vary based on what the final user want to achieve so I will narrow down my question to a very specific implementation. The purpose of the server is as mid size SIP telephony server. The file system layout that I came up with is the following:
The full size of the hard drive is 146 GB
- 1 GB primary partition mounted as /boot
- 16 GB primary partition mounted as /
- 16 GB extended partition mounted as swap (the server has 8 GB memory and it won't get bigger soon at least)
- 52 GB extended partition mounted as /var
- 16 GB extended partition mounted as /var/log
- 30 GB extended partition mounted as /usr
- 5 GB extended partition mounted as /tmp
- 10 GB extended partition mounted as /home
I put the swap in the middle considering that will allow faster access, made a big var partition because there will be a lot of variable data like database files. I moved the /var/log and /tmp into different partition to be sure that it they are filled they won't bring the entire system down and moved /usr also to be able to make it read-only if there is a need for such a measure. I made a small /home partition because the number of user will be low so there is no need for a big storage space the home directories.
There are many arguments for and against this layout I suppose and I'm curios (trying to pick the mind of the more experienced or wiser than me) about what are others thinking about so: is this fragmentation and order good considering fast access (that is why I put the swap almost in the middle), security and data safety? Any thoughts? Thanks!