I have been looking on the web for a little bit of time now before to decide how to setup our new production server. Here is a summary of what i've read in forums and other websites.
Partitions is a very hot discussion and it seems that there are not very clear answers.
Partitioning is good for the following reasons:
1) segregation of data
it's always good to keep data and OS programs separated, to be able to quickly reinstall the OS without affecting all data.
Data means mainly /home and /var directories
> It is tempting to do a partition for /etc, but this won't work as boot scrits are found in /etc and need to be accessible from the same partition as root to be able to boot the OS.
2) quick recovery from crash
the time needed to do a disk recovery can be very long and depend on the size of the partition. Having only one partition can make the recovery process very long.
3) keeping the system from crashing due to a full disk
a system with a full root (/) partition will crash
spliting self-growing partitions such as /var and /home will keep it from crashing due to a full disk
4) speed
data on the external part of a Hard Disk are faster to access because external sectors have a bigger circumference than inner sectors.
When setting up partitions it is hence better to begin with the one needing faster disk access, so that they will be located on the external part of the disk.
Here is the scheme i thought for our 1U LAMP server:
/boot
/swap
/
/var
/var/www
/var/mysql
/var/log
/home
larger partitions will be /var/www and /var/mysql
/var/log has been setup to keep in control the size of log files so that they don't fill up the root partition.
Commentaires
Enregistrer un commentaire
Tell me what you think