ideal partition system

Frej

Verified User
Joined
Jun 15, 2008
Messages
134
so i will be getting a server with 2tb hdd can anyone recommend me the parition setup?
at my older server /home is using 1.2 tb data
on my control panel where u can reinstall os from there,
theres partitiion types primary, logic and lvm so i got no clue which to select
 
Last edited:
Very controversial subject; probably as many opinions as there are system administrators.

Here are a few of my thoughts, which could change by tomorrow:

You don't need Logical Volume Management (LVM); it's a software abstract layer, so it uses a bit of system resources, and in a modern single-drive system it doesn't really give you any benefit. Plus it makes it harder to do forensics if the system should ever fail.

You don't need Logical partitions. Linux never needed them, but som OS distributions required them as part of their installation system, to maintain MS compatibility (MS software has a limitation of only four Primary partitions). You're probably never going to share your server between Linux and Windows, but you may still find your OS has limited you to four Primary partitions, and you may need to use logical partitions if going over four (or in some cases, three) partitions.

Now for the most controversial issue:

Until recently I used to partition similarly to this:

Code:
250 MB  /boot
2.5 GB  / (often called the root partition but not to be confused with the root user directory)
4 GB  /tmp
15 GB  /usr
15 GB /var
Then a swap partition equal to memory size.

And then the balance for the home directory.

However, I've recently changed my mind; I now create only a swap partition equivalent to the server memory size, and use the balance as one primary partition for /.

Other opinions welcomed :).

Jeff
 
for one HDD i use this configuration:
200MB /boot
2-8GB swap (half of RAM)
/tmp - 10GB at least (depend of what the server is for, if you wish to upload big files and you are planning to use /tmp as upload target in PHP you should raise this partition size).
/ - left space
 
Thanks, BestBoard, for reminding me that I completely forgot to mention that I create a virtual /tmp partition; this works on both standard and VPS servers.

Jeff
 
I typically do:

/boot = 200mb
swap = 8gb
/ = rest

/tmp and /var/tmp are both 4GB (if you rotate /tmp properly this is typically enough unless you have some massive mysql tmp tables) and mounted with noexec and nosuid

/dev/shm is mounted with noexec and nosuid

/is mounted with noatime,nodiratime to speed up the filesystem I/O

YMMV but this has always worked well for me.
 
On my 1TB systems I use 10GB for /tmp and a symbolic link /var/tmp -> /tmp.

Definitely agree on the noexec and nosuid settings.

Jeff
 
I use to setup partition this way:

/usr 20G
/var 20G
/tmp 20G
swap double of RAM for RAM lower than 8GB, otherwise same as RAM
/boot 250MB
/ remaining space (that should be the biggest partition

Regards
 
Back
Top