Partition for DA install

Barney

Verified User
Joined
Mar 9, 2004
Messages
6
I could use some expert partition advise.

I have a red hat 9.0 , on a p4 3.02ghz, 1g ram with 2 hard drives.

The 1st hard drive is 160gb
The 2nd hard drive is 200gb

The basic partition for direct admin c panel is

/boot 40 meg
/dev/shm 2 x memory
/ rest of drive

Do i set this on the 1st hard drive? Do i have the hard drives set backwards?

I would like to use the other hard drive as a back up drive, so what would be my best partition for each hard drive to make direct admin sucessfully install and the system to run?

Many thanks in advance.
 
I am no expert on RH but many users seem to partition the lazy way with just a /root and /swap. The way I do it is something like the following but someone can help me out with this if I messed up the partitions for RH:

/ 1GB
/boot 100mb
/swap 2xRam
/var ~10GB
/usr remaining

I am not 100% sure but I think you might want to make the /usr like 3GB and adding /home as the remaining rather than above.
 
it would help knowing which hard drive gets which partition.

thumbs up
 
The 160 would be the best choice. You know you can never run out of space on the 200. You could get creative and have DA backup automatically to the spare drive.
 
ok here goes

my first hd , the 160gb will be partioned as

/boot 100M
/usr 8192M
/var 8192M
/tmp 1024M
swap (x2 RAM, Max 2048M)
/home fill to disk


then what do i use to partition the 2nd hd, 200gb?

i am using the disk druid from red hat 9.
 
What are you going to do with the second drive?

If you're only going to use it for backups, then create one 200G partition.

I'd definitely create /var/log on the second drive, though; logging is a lot faster (and doesn't slow down the system as much) when it's on a second physical drive.

Another note, the instructions everyone continues to quote on swap being twice the memory are old and outdated.

Said instruction was fine when memory was 4 - 16 Megabytes, but if you've got a gig of memory you'll probably never use any swap at all.

However, since you may want to be able to check a system dump if you get a kernel crash, you should have your swap partition at least the same as the memory size.

Jeff
 
Another note, the instructions everyone continues to quote on swap being twice the memory are old and outdated.

Old and outdated I don't think so, I don't follow Linux that as much but you should really have a sizable swap.

From what I have seen you should have a 2:1 till about 1GB of physical ram then you could have a 1:1 ratio. This all depends on the loads of the machine.
 
You admit you don't follow Linux that much but you're sure ?

Please show me current documentation that tell you you need swap equalling twice your memory.

I've been a linux user, admin, and hacker since late 1994, and a Unix user, admin and hacker for years before that.

I understand exactly why I don't need that much swap.

Why do you think you do?

Because you read it in a book dated a few years ago and you've never changed your mind?

It's possible there's a major distribution somewhere that's stilladvising swap equal to twice memory, but I haven't seen one in a few years.

Please show me.

There's a very good reason to have as much swap as you have memory, _if_ you're going to ever debug a kernel panic.

Otherwise what possible use would you have for that much swap, given that once your webserver is using swap memory it's running too slow to be useful?

Thanks.

Jeff
 
ahh yes I see where your going with that sorry I came across like I did. I just had a fight about bandwidth with a employee and may have choose my words wrong. (he claims that a 7MB connection we are installing is going to be maxed out with 13 users surfing the web).

You are correct and if I am not mistaken the recent versions of the linux kernel were designed to work without ANY swap space. Here is where you can correct me for Linux, BSD systems needed a 1:1 at minimum ratio for a long time. The kernel used the swap immediately for the amount of ram you have. Linux never had that type of issue. With BSD that point if you want more virtual memory you HAD to have 2:1 or higher.

The way I understand it is that the Linux kernel has options to turn off swap and paging. Yes people are reciting the old rules and that needs to be changed but in FBSD the system is specifically designed for 2:1.

I come the the firm idea that you want 1:1 ratio at the least so you can hold a full memory dump so anything under 1GB of physical I will make 2:1 anything above I do 1:1. Even that logic is outdated but it gives room to expand, you could easily do a 1:1 above 512.

Bottom line you are correct, with some understanding of swap spaces.

FreeBSD's Handbook :D
6.2.1.2 Swap Partition


As a rule of thumb, the swap partition should be about double the size of system memory (RAM). For example, if the machine has 128_megabytes of memory, the swap file should be 256_megabytes. Systems with less memory may perform better with more swap. Less than 256_megabytes of swap is not recommended and memory expansion should be considered. The kernel's VM paging algorithms are tuned to perform best when the swap partition is at least two times the size of main memory. Configuring too little swap can lead to inefficiencies in the VM page scanning code and might create issues later if more memory is added.


On larger systems with multiple SCSI disks (or multiple IDE disks operating on different controllers), it is recommend that a swap is configured on each drive (up to four drives). The swap partitions should be approximately the same size. The kernel can handle arbitrary sizes but internal data structures scale to 4 times the largest swap partition. Keeping the swap partitions near the same size will allow the kernel to optimally stripe swap space across disks. Large swap sizes are fine, even if swap is not used much. It might be easier to recover from a runaway program before being forced to reboot.
 
Thanks for your clarification.

I'm still only experimenting when it comes to FreeBSD, and I still have quite a bit to learn about it.

The BSD I've used in the past (we ran an ISP based on BSDi, the "commercial" BSD) we always had 2x memory, but of course we never had more than 512k memory in those days.

I wasn't aware the BSD still likes 2x memory, but the snippet of the manual you quoted explains it clearly.

Jeff
 
Thanks guys,

Didn't know I would create an arguement on the swap...


I guess as a newbie setting up a server from the ground up,

I partion the basic as required for direct admin c panel install,

1st HD, 120gb

/boot 40 meg
/dev/shm 2 x memory
/ rest of drive

2nd HD, 200gb
one full partition

I have one server running and never built it up and was already pre installed, pre loaded with CPanel. Since CPanel is way expensive, I would like to set up a second server with direct Admin c panel. I'm not in the web hosting for $$$ but as a learning tool for myself since I enjoy building web pages.

Many Thanks, for the HELP.
:cool:
 
If you really want better performance make the 2 swap's. One equal to the ram on one drive and one equil to the ram on the other.
 
Without wanting to get into another *** match, I must wonder if it's not a better idea to just create swap on the 2nd drive.

I know I would. And I know why.

The system will use one swap partition to capacity until it uses the other.

What I don't know is how it chooses which to use first.

But I do know that a swap partition, and a /tmp partition, on the second drive, will definitely result in speedier operation, as it will mean less head "thrashing".

Jeff
 
You can it is a performance boost but if you have enought ram then it should not be much of a issue. As Jess pointed out swap is being less and less used as we add more and more RAM. If it was me I would put the one swap on the other drive or break the swap in 1/2 and put them across both drives.
 
And I'm still going to respectfully disagree and recommend putting it all on the second drive. Though I think there might be some speedup in having two swap partitions (depending on OS algorithms), you can certainly do that on the same drive in Linux. In fact, up through 2.0 you had to do that because the swap partition maxed out at a very small number.

As far as /tmp is concerned, here's an interesting issue:

Unless the latest versions of the pop daemon differ radically from the ones I used a few years ago (I switched to Maildir a few years ago and only less than a year ago started using mbox again), they create a temporary copy of the pop mailbox in /tmp whenever someone logs in.

On systems where the user owns his own mailbox this would mean the user couldn't download his email once the file size got to half of the remaining unused disk quota on his account.

Unless you had /tmp on it's own partition, without enabling quotas on that partition.

This isn't as important in the DirectAdmin model, because mailbox owners in most cases aren't system users, and their mailboxes aren't affected by per-user quotas.

However, it's something to be mindful of, as pop3 isn't the only program on the server to write to /tmp.

Jeff
 
Back
Top