LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-23-2009, 01:50 PM   #1
unearthed
LQ Newbie
 
Registered: Dec 2007
Posts: 4

Rep: Reputation: 0
Partitioning schemes for a web-oriented server


I'm installing Debian (lenny), but can't decide the partitioning scheme. As stated above server is for web/db/mail purposes, basically a trivial solution - Apache, MySQL, PHP... etc. I have seen dozens of schemes, but haven't really grasped the sense in them. I have available space of 290GB which is an hardware RAID array, but it's not the case.
So here are my questions:
1. Is there a difference in which order partitions are created? If yes, then which partitions should come first, I assume something like swap or could be "/" partition?
2. Is it more efficient to put "/var" and "/home" in separate partitions, since kernel supposedly can do asynchronous I/O operations to different partitions?
3. In what proportions should I share the left space between "/var" and "/home"? Or maybe the most efficient way is to use LVM?
4. Is LVM partition decreasing the performance in terms of I/O operations?
5. How kernel acts in the case of LVM partition (is it still able to do async reads and writes)?
6. Here is the scheme, based on what Debian has offered and what I have picked from different sources:
Code:
/     - 400MB (primary) (I assume root gets NOTHING in that case, but I would gladly give it few GBs)
/usr  - 5.0GB
swap  - 2.0GB (but Debian offers 2.7GB) 
/tmp  - 500MB
/var  - 142GB 
/home - 142GB
I just split var and home evenly for the sake of simplicity. I have seen some people giving separate partitions for "/usr/local", "/var/logs" , "/opt", "/boot" but I almost can't see the practical meaning of it, it's possible that I'm blind. Also giving web pages, db's and mail server different partitions is also common, but I have no idea if it's useful, but if kernel is getting the use of separate partitions for real I will gladly look at this direction.
So here is what I have so far.

Thanks for any help in advance and sorry for my ignorance.

Last edited by unearthed; 05-23-2009 at 02:10 PM.
 
Old 05-24-2009, 11:25 PM   #2
geek745
Member
 
Registered: Jul 2004
Location: Alton, IL
Distribution: Linux Mint; Slackware; Ubuntu; Slax
Posts: 172
Blog Entries: 2

Rep: Reputation: 34
A couple points to consider - though I do not have experience configuring a production server as you have described, I have configured and reconfigured several generations of machines for my home use, some of them playing "server" roles in my local setup. It is logical to keep "OS" and "Data" on separate partitions, because you can reformat the "OS" and reinstall an operating system out from under your data, without ever having to consider backing it up. I typically make some reasonably-sized partitions for my operating system (12-18GB), double my RAM for swap space, and the rest a "data" partition. Every distro I install on top of that then gets the users created with the same UID's and the local home directories simply symlink to the user's data on the other partition. This has been very effective for me.

I also do not know about the implications of speed across partitions on a RAID array (mirroring is supposed to be "slow" because the written data has to be distributed onto two hard drives, and striping requires data to be written onto "both" drives, as well). I have no speed advantage with my setup because everything is on the same drive - you should only expect a speed advantage if your os and data segments are located on separate hard drive channels in your system; by this reasoning I should actually incur more disk latency because of the read head having to jump around to get my applications and then user data. This is negligible for me because I am not doing any heavy duty work.

Anyway, those are some of the ideas that I have used in the past - hopefully that helps you make sense of things.
 
Old 06-18-2009, 10:14 AM   #3
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Home use only.

I use LVM to give flexibility; but more for isolating different types of data from each other,
rather than to separate /var, /var/log, /tmp, /usr, etc.

Your 6 Q's are interesting & the answers would be useful. I wish someone would address them.
 
Old 06-18-2009, 08:10 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
If this is a serious server (ie not just home use), then putting each major service web, db, mail on separate partitions would make sense. Also /var to avoid logs filling up the other working areas (if you get an issue).
As mentioned, separate OS from data.
It'd be a bit unusual to have a lot of human users on a server like that, should be on a different box.
Effectively, I've separated things at the logical level in my comments.
If this is all on one large HW array, you still need to worry that an array issue could break all your services regardless...
 
  


Reply



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 Schemes SlackWareWolf Slackware 3 03-02-2008 12:07 AM
Optimal partitioning schemes d00bid00b Linux - Software 9 08-16-2006 01:00 PM
Web Server Partitioning toneee Slackware 4 02-01-2005 07:51 PM
Partitioning schemes snocked Linux - General 1 02-01-2004 05:20 AM
Advantages and Drawbacks of Different Partitioning Schemes BillRice Linux - Security 0 03-01-2002 01:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:01 PM.

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