Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 12-09-2002, 06:34 PM   #1
Registered: May 2002
Location: Elkview, WV
Distribution: Slackware 10
Posts: 139

Rep: Reputation: 15
Best Partitioning Scheme?

I am looking to set up a Slackware box with Apache, PHP and MySQL. Along with qMail to provide email for a couple domains.

What is the best partitioning scheme for doing this?

My current layout is:

/boot 300MB hda1
/root 1000MB hda2
/swap 240MB hda3
/usr 1000MB hda5
/var 1000MB hda6
/opt 1000MB hda7
/home 1900MB hda8

This is just a test system... will have a 40GB and a 20GB hard drive on production box.

What about Inode density on each of these partitions?

I understand you might want to use a lower Inode setting if you are going to have alot of small files, which might be the case for qMail.

So which partitions might need a smaller Inode density?

Any suggestions are welcome... especially from others who might be running Apache, PHP, MySQL and qMail on a Slackware box.

Old 12-10-2002, 12:27 AM   #2
Registered: Dec 2002
Distribution: redhat 7.3 now upgraded to 8.0
Posts: 53

Rep: Reputation: 15
set up in this order
/boot 100meg
then set up a swap twice that of youre ram
how much hd space do you have left? (write that down)
delete swap and make a / root to the size that you wrote down now make a swap using the remaining space on harddrive.

must be in this order to work though
that is the most basic setup i can think of.
use the 40 gig for storage or what ever you like.
thats just my opinion though.
Old 12-10-2002, 01:41 PM   #3
LQ Newbie
Registered: Jul 2002
Posts: 17

Rep: Reputation: 0
The answer is really: it depends. There are two main configurations I use.

1. For a desktop/workstation environment, I have:
/boot (50 megs)
swap (twice my RAM or 512 Meg, whichever is smaller)
/ (root partition - 3 to 5 gigs depending on space)
/home - whatever is left

This would also be a good setup for a file server.

2. Production server setup
Your initial suggestion is actually pretty close to what I usually see recommended for a server. You'll want to drop /opt unless you plan on installing any add-on packages in there. Also, you really should have a /tmp partition on a server. Otherwise, if something tries to write a ton of stuff to /tmp, your root partition will fill up and cause all kinds of problems. Oh yeah, and /boot has no reason to be over 50 megs.

On the inode density, its not usually something I mess with. The default has never seemed to cause any problems.
Old 12-10-2002, 02:33 PM   #4
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927
Heh ...

another question that might start a holy war :}

My personal setup on my notebook is
(was ... *makes the cross-symbol with his hand)

/boot        32MB
/          9000MB
/home      2000MB
/usr/local 4500MB
or similar percentages for other boxes ... ;}

Old 12-10-2002, 09:34 PM   #5
Registered: Nov 2002
Distribution: Slackware
Posts: 155

Rep: Reputation: 30
I don't understand the /boot partition. I have been using slack for a few years now and always use:

first x number of MB for swap. whatever twice my RAM is. Right now my first partition is 500MB (256MB RAM). I make swap my first part because the first sectors of the HDD are supposed to be accessed the fasted.

I then create the / (root) partition. I have never created a /boot partition. Why would one create a /boot part.. ?
Old 12-11-2002, 08:48 AM   #6
LQ Newbie
Registered: Jul 2002
Posts: 17

Rep: Reputation: 0
/boot was originally made to overcome a limitation of LILO. In the past, it could only boot to the first 1024 cylinders of your hard drive, so could make a tiny partition at the beginning of the drive, and throw your kernel in there to avoid the problem. This problem has been firxed for a while now, but I still use /boot. There are a couple reasons:

mount /boot read-only (except during kernel upgrades) and you don't have to worry about anything messing with the kernel.

I don't feel like repartitioning all my boxes. If I have to do a clean install I might consider it.
Old 01-18-2003, 10:35 PM   #7
Registered: May 2002
Location: Elkview, WV
Distribution: Slackware 10
Posts: 139

Original Poster
Rep: Reputation: 15
So /boot partition is not necessary?

And for my scheme it might be a good idea to do away with /opt and replace it with a 1GB /tmp?

Eventually I am working toward building a server that will use Apache, PHP, MySQL, DJBDNS, qMail and either PureFTP or ProFTP. I also want to test some of the weblog apps like PHPNuke.

So what would be a good partition scheme for this purpose?

Like maybe

/root 5GB
swap 128MB
/tmp 1GB
/usr 4GB
/var 3GB
/home 10GB+

My workstation is a Dell 4100 1GHZ with 80GB hard drive... my server is one I built myself... an Athlon XP 1.8GHZ with a 40GB and a 20GB hard drive.

Should swap be created first and then root?

Old 01-18-2003, 11:04 PM   #8
Registered: Jan 2003
Location: Northam, W.A., Australia
Distribution: Gentoo ~x86
Posts: 321

Rep: Reputation: 31
I currently have a 9.5Gb /usr, 8Gb / and a 1.6Gb /home on /dev/hda's 1,5 and 6 respectively. The reason for /usr and / being back to front is because hda1 used to be my Windows drive and since /usr is the fastest growing part of my system (due to an overflowing /usr/src directory) it got first dibs on the free space. At 1.6Gb, /home is way too small but it was all I could really spare at the time I created it.

If I were reinstalling I'd forego the seperate /usr and / partitions (the only reason I have them seperate now is that it would have taken a lot of partition massaging to unify hda1 and hda5 after Windows was removed and I didn't really want to reinstall Slack again, not when I was so close to finally getting GNOME built and after I'd just reinstalled because of stupidity on my part) but still maintain a /home partition but this time making it larger because I have more space to work with.

If nothing else, it's a good idea to have at least /home mounted on a seperate partition. Knowing you're stuff will be safe in between OS reinstalls makes things a lot easier.

edit: Forgot to mention theres also a swap partition (I don't have enough RAM to go without one yet!) in there, that's on hda7 and is ~197Mb in size.

Last edited by LSD; 01-18-2003 at 11:07 PM.
Old 01-20-2003, 08:52 AM   #9
Registered: Jan 2003
Distribution: many win/nix/mac
Posts: 259

Rep: Reputation: 32
Many many ways to do this--my formula is like this:

/boot 512 mb
/swap x2 ram
/ 3gig mininmum for slackware (8.1 will fit in 2.2 full install i believe)
/home the rest of drive (I generally save and uncompress everything in here and ln -s to other places when I can)

Last edited by flashingcurser; 01-20-2003 at 08:54 AM.
Old 01-20-2003, 10:37 AM   #10
Senior Member
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
This seperate partition for /boot thing is new for you Slackware guys (weren't old kernels in root / dir) but Redhat has had it for a while mainly to keep the kernel down below the 1024 cyllinder mark for old LILO versions which doesn't apply to Slackware 8.1. I do like the supenguin's idea though of mounting /boot read only so nothing can change your kernel image.

Anyhow, Redhat says 5-10MB (meg not gig) for /boot, all it will ever hold is kernel images, symlinks and small text files. 10MB is room for 8 or 9 kernels plus whatever else and at the most I've had 5 kernels under Redhat but 3 tops in Slackware; Unless your doing kernel development and build new kernels daily... Some of the sizes at 512MB, 50MB are overkill and just waste hdd space. Sorry if it sounds like a flame of those with big /boot partitions but 10MB is fine, no more than 40MB max.

If your new to linux and playing with slack do one giant root then a swap and you can repartition when (not if) you decide to reinstall which will give you an idea how much space you use in each dir. (try "du -hs /*" to see how much space you use after installing.)

swap is a point of contention too, in olden days swap was reccomended 2-3x RAM but we can get massive cheap RAM. So again I defer to supenguin's choice "swap twice my RAM or 512 Meg, whichever is smaller." If you had 512RAM and 512SWAP that's a giant amount for linux that you wouldn't use unless you ran a major website while playing UT under wine and surfing with an oversized web cache. Older versions of linux had a max of roughly 130MB for swap and this is also ample for most systems. (open everything you can think of and then type vmstat)

My current scheme:
/ 1.5gig
/usr 3.4 gig
/home 10 gig
swap 131 megs
but I use my system different than you and I think my judgement was off when picking this.

/var I'd go seperate for log files; on a web/mail server on the net you could fill a drive with log files if you come under attack or something goes haywire and a seperate /var keeps the root partition from filling up when this happens, maybe 1 gig tops, probably 500megs is ample (my personal web server/firewall has 32meg in /var.)

/tmp maybe seperate too, similar to /var though don't overkill because it will be mostly empty unless something breaks, maybe 500meg to 1 gig tops (my server has 1.1megs in /tmp right now, mostly X/KDE stuff.)

/opt I have no idea, I think apache uses opt for web site space but you can change that to /home if you have few users taking space

/home is for users and you can move your http root and ftp root here too so put whatever is left here.

/usr or /usr/local this is supposed to be seperate to make it easier to do upgrades to new versions of your distro but it's kind of a preference thing and if your server is running live you won't be doing a distro upgrade but probably package upgrades or installing tarballs.

/ is sort of a what's left thing, between / and /usr you need about 3 gig to install everything in slack and have breathing room, if you do a seperate /usr and /home then 1gig is probably fine, if you don't seperate /usr then 3-5gig is good.

Also if you have multiple HDDs and one is faster put swap and / there so the system can get at it's binaries quickly and swap quickly. Put web space etc on the slow drive since most of your web hits if your site is busy will be cache hits and if it's slow then your internet pipe will be the bottleneck not hdd speed.
Old 01-20-2003, 07:16 PM   #11
Registered: Dec 2002
Distribution: redhat 7.3 now upgraded to 8.0
Posts: 53

Rep: Reputation: 15
the only reason I used 100 meg for a boot partition is that that is what the default is for redhat 8.0. No big deal i just went with that. Still trying to keep it simple I used the rest of the drive for the root partition carefully leaving my self enough space for a swap partition. I run Websites on my box so ram is a big Deal here. I have 384 meg of ram and a swap of yes you guessed it 768meg. When running websites under apache they reccomend that you have enough ram so that you never have to use you're swap space. For example I fire up my server and everything is running ok. someone accesses my website. It takes a little bit to load, but if someone else visits that site than it is already stored it ram and loads immediately. After the server is up for two days the available ram goes from 230meg to about 50 meg. Why because linux indexes the drive to keep the performance of accessing the harddrive up, also i have search engines scanning my sites all the time, and if i have to work on the server that takes up ram, I mean it gets cached. I'm not saying that it is important and I don't really have problems, but i have the peace of mind knowing that the websites that i host always load fast, Having a really quick harddrive helps also. If you can afford a 15,000 rpm scsi than get it, as a matter of fact get two and mirror them. If you are on a budget like me get 2 maxtor udma 133 drives and mirror them. My experience for a budget server is getting at least a pentium II 350. A pentum I with my experience is way too slow. or at least a amdk62 500 or above. But the pentium will run cool to the touch. at least a udma 66 drive maxtor seems to be the fastest from my benchmarks compared to other drives, but if you have a udma100 or faster drive than this doesnt matter. the siig udma133 interface card works perfectly under redhat 7.3 and 8.0 and with a maxtor udma133 drive linux will scream. with this setup you will only need 128 meg of ram but if you wan't more go ahead it won't hurt. my personal setup goes like this........
biostar socket 370 motherboard model #M6VCF says Vega on the box.
cheap pc133 ram 384meg would like 768
celeron 800
smc $10.00 network card. This is the fastest card i have ever seen
the only thing faster is a d-link 1000tx network card, this card will blow the doors off any 10/100 card even running in 100tx mode
siig udma133 interface card with a 60gig maxtor udma133 drive
ati 8meg agp card so i can watch divx movies and dvds if i wanted
(I Love Computers Can't you tell!)
teac 1.44 floppy drive. I love these drives but I love for them to work also thats why i always get one of these babys
My preference is lite-on for a cdrom dvd or cdr drive cheap and extremely dependable, get it at pc club in fact if you want dependable parts that always work buy it there.
my server screams.
i wonder if theres a noticable difference between a celeron 800 and a 1ghz pIII which is the max this board will support.
anyways thats my input. this is a completely stable setup.
by the way the motherboard has the latest bios abd the cards are agp slot 1 ethernet slot 2 and siig udma card slot 3.

This is just my input and a suggestion don't flame me on it and I'm not an intel only guy I use an athlon xp proccessor on my workstation. 7vrxp gigabyte mobo 256meg ddr333 ram and stiped maxtors. works wonderfull in linux but as far as performance it seems to be just slightly faster that my celeron setup under linux only.
Old 01-21-2003, 04:46 PM   #12
LQ Newbie
Registered: Jul 2002
Location: SF Bay Area
Distribution: Slackware
Posts: 3

Rep: Reputation: 0
One distro (forgot the name) actually umount'ed the /boot partition after boot, for that extra measure of safety.

As to formulae for partitioning... there isn't one. What I recommend is this:

1) List the various types of data you will host (mail, database, multimedia, user home dirs, etc)

2) Rank the relative importance of each type of data, and take into consideration whether you will have a backup strategy for each

3) Estimate the volume of each type of data

4) Estimate the volume of application logging you will have (sendmail logs, Apache logs, etc) and consider whether these are important to you. You may want to keep /var/log on its own partition.

5) Estimate how much swap space you REALLY need. We've all heard the "2x RAM" estimate, but this dates back to 32M machines -- I have 512M on my workstation, and I hardly ever swap out more that 20M (and that's only when running a LOT of heavy duty processes, which is something most "servers" probably won't experience).

Now you may be in a position to start determining what needs to be kept on its own partition, and how big each partition should be.

As to inode size, that depends on the file system you choose... for example, I think that inode is meaningless in a reiserfs, but it is important if you use ext2/3fs. At any rate, you probably want to use a journaling fs.
Old 01-22-2003, 10:25 PM   #13
Registered: May 2002
Location: Elkview, WV
Distribution: Slackware 10
Posts: 139

Original Poster
Rep: Reputation: 15
Thanks for info... good info there...

I have already chosen ReiserFS for my file system.
Old 01-23-2003, 04:26 AM   #14
LQ Newbie
Registered: Dec 2002
Location: Where the Columbia River is joined by the Yakima and the Snake
Distribution: Mint, Suse,
Posts: 25

Rep: Reputation: 2
Greetings All: This is to Daren...... I have been wondering about the /boot partition stuff for some time. Your post answered a question that has been bothering me for a while.
I have a small collection of Toshiba T200 Pen-tablets that have a propriatory harddrive of 80 meg with a PCMCIA type 3 slot for an ATA HD which I have several of. I am wanting to install a distro of linux but was having trouble getting around the small main (non-replacable) drive. Assuming your info is straight all I need to do is use my boot floppys to start the install via my PCMCIA CD drive in the other PCMCIA slot, partition the Main drive with /boot of about 10 meg use the other 70 meg as swap, install a kernel that will run my PCMCIA HD with it identified as / (root) (2gig)
As these machines have 36 meg of RAM it will be a light weight system by todays standards, but what else is new, in 486s that is??!?!?!?!?!?!?!
Old 04-16-2003, 11:56 AM   #15
Registered: May 2002
Location: Elkview, WV
Distribution: Slackware 10
Posts: 139

Original Poster
Rep: Reputation: 15
Anyone out there running Apache, PHP, MySQL and qMail have any other suggestions about partitioning for a server?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Partitioning scheme? i.of.the.storm Linux - Newbie 9 08-28-2005 08:27 PM
partitioning scheme Godsmacker777 Linux - General 2 11-28-2004 03:58 PM
best partitioning scheme equinox Linux - Distributions 5 05-10-2004 11:34 AM
Partitioning scheme pcdebb Linux - Newbie 1 01-20-2004 10:01 AM
Partitioning scheme for performance Bruce Hill Linux - Hardware 11 10-11-2003 11:42 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:20 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration