hello everyone, I am running UBUNTU 6.06.1LTS server and i am wondering what would be the best partition scheme for my hardware configuration, currently i have an 8.5GB HDD (hd0 / hda) and an 80GB HDD (hd1 / hdb) i also have the availability of a 40GB HDD and i was thinking of reserving the 80GB HDD for all of the user accounts but because logs and databases would take up a large amount of space i am wondering what would be optimal. the machine that will be running contains a 2.8GHz intel processor with 1GB ram, the system will support up to 4GB ram (my feelings are that swap should be 2x system supported ram, not 2x system ram like most presume). the partitions i am wondering about are "/", "/boot", "/tmp", "/var", "/home", and "swap". from my experience 40mb is big enough for "/boot" and 1GB is big enough for "/tmp"
I can’t claim a “best” partitioning scheme, but I can share mine with you!
2x160GB drives (Linux RAID)
/swap ~4GB(2x the maximum allowable RAM for the motherboard even though this box only has 1GB of RAM currently)
For the record, when I originally built this box one of the drives failed after 2 months. I was very glad for the Linux RAID at that point. Shutdown, pull the bad drive, put in a new one and after 2 reboots, the server was back to normal.
So what ever partitioning scheme is fine, but failover is priceless.
Joe<br><br>Post edited by: BossHog, at: 2007/07/10 16:40
ok so the machine that the partition scheme is going to be used on is a server so failsafes are allways good, the machine is a replacement to what i allready have and in that machine is 1 8.5GB HDD and 1 80GB HDD, i have a spare 40GB HDD here that i was thinking of just tossing in a testing machine so i wouldnt have to re-partition the 120GB HDD that is in it. the current partition scheme i have right now is:
/boot = 40MB = hda1
/ = 5GB = hda2
/tmp = 1GB = hda5 (nosuid, noexec)
swap = 2GB = hda6
/var = 73GB = hdb1 (grpqouta, usrqouta)
and of course unfortunatly a problem that falls inline with this partition scheme is that the control panel on the current machine uses "/var/www/virtual/" as the users home directory where as the majority of control panels to chose from like webmin use "/home/" as their user home directory. the new partition scheme will have to include a partition for the home directory and because of this what i should go and run with, where i should make space cuts if needed and all that sort.
Virtualmin Professional (and the new Virtualmin GPL installer coming this week), put homes in /home (where Thompson, Ritchie, et al. intended). So I tend to put all of the excess in /.
For /var it’s also useful to have a little breathing room, because when things go wrong (or really right) you can have lots of logging happening.
With modern Linux distros, you’re not really locked down too much by backup/restore conventions, or by partition size constraints, so I like to keep it simple:
but also by useing multiple partitions it makes it much easier on the body if on the instance there is a system failure in one of the directories that is on its own partiton (you will loose only that partion instead of the whole filesystem if a reformat is needed) also if you decide to expand the side, the use of haveing say the home directory on its own HDD then expanding is easier by just upgradeing the size of the HDD. also you can increase security a small bit by putting /tmp in its own partiton and useing the flags nosuid and noexec
Hey Joe and Mike,
I do have another server (SME Server) that uses, by default, the partitioning scheme that Joe pointed out. It sets up Linux RAID and LVM, with /boot, /, <swap> regardless if you start with 1 HDD or 2 HDD’s. It is an awesome setup for simplicity and safety.
The CentOS box with Webmin/V-M, uses the partition scheme I previously mentioned. When I looked into slicing up the HDD’s, one of the protections was to put /var/log in its own space to avoid filling the /<root> with log files, which could fill the drive and bring the server to a stop.
When I was trying to decide on a partitioning scheme, I found to my surprise, there are a lot of different ways to do the same job. There are plus’ and minus’ with all of the options I looked into. Pick the one you are most comfortable with and be a good admin!
its very true, the use of /tmp on its own partition instead of rolling it into the root partition is that /tmp is for temporary files and you dont want files to be executed from that directory cause it poses a security risk so you would set the noexec flag whereas if you put that flag on the root partiton it would break the entire system as for the /var/log directory this is true that if you were to fill the root partiton full it would in turn break the system and you would have to pull out your emergency live cd to repair it so putting /var/log or just /var itself on its own partition adds for that protection of filling up the root partition with old log files. and continuing on to using a more advanced partition scheme instead of the simple "/boot, /, <swap>" scheme is that if for some reason the root partition got corrupted you can still save the rest of the system because your home partition wouldnt be effected nor would your var partiton, you could also go as far as searching through the logs to find out what caused the root partition to become corrupted because they would also not be effected unlike in the simple scheme where everything would be corrupted because its all rolled into the root partition