Best partition scheme for DA?

smoked1

Verified User
Joined
Jul 5, 2005
Messages
85
I am new to DA and have always done things from the command line. With two 80GB drives what would the most efficient partition scheme be for use with DA? I don't know where DA puts things so this is a bit hard for me? Any input is very appreciated.
 
I would really love some help with this. How does this look?

80GB Drive#1

/boot 40 meg
swap 2GB
/tmp 1GB with noexec,nosuid in /etc/fstab
/ 7GB
/var 10GB
/usr 10GB
/home rest of drive.

80GB Drive#2
/bak
 
If you are just going to use the second drive as a backup you may want to look into having a RAID 1 setup, it would increase disk I/O performance (if using hardware raid) and mirrors all data onto both drives. Personally I dont see why you need to break it down so much anymore, modern systems dont need a seperate boot area anymore.

/tmp 1GB nosuid,noexec
swap 2GB
/ The Rest

Simple but effective.
 
If you are just going to use the second drive as a backup you may want to look into having a RAID 1 setup, it would increase disk I/O performance (if using hardware raid) and mirrors all data onto both drives. Personally I dont see why you need to break it down so much anymore, modern systems dont need a seperate boot area anymore.

/tmp 1GB nosuid,noexec
swap 2GB
/ The Rest

Simple but effective.
I'm going to respectfully disagree with the above. It'll work fine as long as the system works fine. If you've got some runaway processes it could fill the entire drive before you realize it.

But that's just my opinion.

Jeff
 
I just want to point out that the /home partition is quite important if you don't want to run into problems with open_basedir restriction in PHP.
At least in FreeBSD it's quite common to have a partition /usr and then just point /home -> /usr/home. I haven't got open_basedir to work if a user includes a file in their home directory by using the path /home/USER/domains/...
The solution to this is to instead include the file from the path /usr/home/USER/domains/... but this is far from obvious to the customer.
Therefor we always have a /home partition on our new systems.

(open_basedir doesn't coop with sym links?)
 
If you use / for the rest of drive then you don't need a specific /home one, there will automatically be one since / will encompass all the other areas not specifically partitioned. As Jeff said if you have a rogue process it can fill up the drive but either way having a rogue process is pretty bad and is going to fill up something but I would rather have so I dont have to reformat if one of the partitions is reaching its limit, with all of it in / then only way that happens if hard drive is too small.

Example, make /var 10G but not using dovecot so emails start to fill up /var but you have tons of free room in /home, would have to reformat to make the /var partition bigger and store more email or else format some of the older emails whereas having it all in / makes it not matter since all the free room on the hard drive is accessible to /home and /var.
 
Well, I already got it setup and it seems fine for now. Now I just have to figure out how to work that DirectAdmin thing. :)
 
Jlasman, could you please give us an example of you you configure the partitions on your DA servers?
 
This may NOT be best for you, and only works on servers which large drives, because you need enough space on /home for all the mailboxes when using Dovecot.

The following is for Dovecot. If you're using mbox mailboxes, raise the /var partition to at least 10 Gigabytes.

Code:
/		 2000 Megabytes
/usr		10000 Megabytes
/var		 5000 Megabytes
/tmp		 2000 Megabytes
<swap>		 1024 Megabytes
/home		<BALANCE>
Jeff
 
Back
Top