Web Hosting Talk







View Full Version : How should I partition RedHat 7.2?


Brian S
08-06-2002, 01:16 AM
I got my new Dell server today. Yippee, I love new toys. :)

Anyway, I'm pre-configuring it before sending it off to its' new colo. It'll be runnining Ensim 3.1.

I'm curious what your suggestions are for how to partition it. Here's how I configured it during setup:
120GB Drive
/boot ~50MB
/usr ~3GB
/home ~110GB
/swap 1GB
/var ~1GB
/ 300MB

Does this seem reasonable? I had thought about formatting it as all one partition, but I was a afraid of something running away in the logs, or a user hogging all my space. What do you think?

Thanks,

Brian

Walter
08-06-2002, 06:38 AM
What will be the purpose of the server? Without that it's not possible to answer your question.
However, I would increase the size of /var and /usr

makri
08-06-2002, 08:34 AM
If you want to install any control panel see to it that you have ample space...for /var and /usr partitions.

for eg: in cpanel /var is logs and mail queue is stored.
/usr is where cpanel goes...

better put in a little more space to these two partitions.

complx.net
08-06-2002, 09:32 AM
Agreed, you DEFINATELY want to increase /var and /usr

I generally have the following:

/ - around a gb
/swap - double mem
/home - 50% of drive
/var - atleast 20% of drive
/usr - atleast 10% of drive
/boot - 40-50mb

stbauer
08-06-2002, 10:38 AM
I generally recommend server owners to create another backup partition, roughly with a little larger the size of /home. Local backups *are* important, people. :-)

As other posters have suggested, a 1GB /var is almost always inadequate these days. I'd recommend at least around 5-10 GB to store various logs and mail queue. If you store all virtual hosts' logs here and host some popular sites, or if you store databases in /var too, enlarge this partition even more.

Since Unix has symbolic links, things actually are not that bad when you run out of space in one of the partitions.

Brian S
08-06-2002, 02:32 PM
Yea, I ran into space problems after rememberign how much goes into /, as well as /usr and /var. For the sake of simplicity, I decided to do a generic /boot - 50MB, /swap -1GB and the rest allocated to /. I doubt I'll be having major space problems anytime soon unless I get a runaway log, in which case, I can still login and delete.

I do have a second identical drive in the server that will be getting backed up to daily.

Thanks,

Brian

Walter
08-06-2002, 04:22 PM
Originally posted by Brian S
/boot - 50MB, /swap -1GB and the rest allocated to /.

Probably not a good idea.

2host.com
08-06-2002, 11:10 PM
I agree, don't put everything onto the root partition. There's too many reasons to list and it's not good practice at all. Here's an example of one of my 60 gig drives:


df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 1.9G 213M 1.6G 12% /
/dev/hda2 99M 7.1M 86M 8% /boot
/dev/hda7 36G 1.1G 33G 4% /home
none 503M 0 502M 0% /dev/shm
/dev/hda6 980M 17M 914M 2% /tmp
/dev/hda3 7.7G 895M 6.4G 12% /usr
/dev/hda5 5.8G 67M 5.4G 2% /var
/dev/hda9 594M 32M 532M 6% /chroot1
/dev/hda10 579M 17M 533M 3% /chroot2


You have twice as much space, I'd suggest something similar (not to double it all, per se), although 2 gig's on my / root partition is generous and you needn't double that. My /boot partition is a little generous, but not a big deal, 50 to 100 megs is fine. I don't think I'd suggest you double /var and /usr, but somewhere at least that size and maybe a little larger and the rest going to home would be good. Obviously a gig for /tmp is a lot too.

I just partitioned it out to whatever felt right to me as I went along. I have a gig or RAM so I added a 512 or 1 gig swap, although either is fine. Maybe looking at this will give you a better representation, although I'd suggest you don't use Ensim, but I won't get into that. :-) Anyway, I usually leave about 1 gig of free space for future use if things start filling up too fast or if I want another partition. I'd also support the previous suggestion of somewhere to put backups, but I'd suggest another, separate drive for that.

StevenG
08-07-2002, 08:03 AM
As other posters have suggested, a 1GB /var is almost always inadequate these days. I'd recommend at least around 5-10 GB to store various logs and mail queue. If you store all virtual hosts' logs here and host some popular sites, or if you store databases in /var too, enlarge this partition even more.

I'd keep /var to about 1-2GB and install a symbolic link to my /backup partition for logs etc - which is usually on another drive - Yes good practice to have a seperate /backup :D