Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-04-2006, 01:37 PM
|
#1
|
Senior Member
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905
Rep:
|
LAMP Server?
I have a small 1U server (Dell PE850) ready to be a L.A.M.P. server (Linux / Apache / MySQL / PhP).
The drive is a 80GB drive & I am not sure what is a safe partitioning size for each mount point. Can someone please help me and tell me if you were building a non critical LAMP server and had only 80GB's of disk space to work with, how would you partition this disk? I have never dealt with SQL so I don't know what directories are crucial for size and what a safe buffer is.
Can anyone just throw some ideas at me? This box will not have more than 3 users so I don't think the home directories will need to be massive unless SQL or PhP need their own /home directories.
|
|
|
10-04-2006, 04:44 PM
|
#2
|
Member
Registered: Nov 2005
Location: New Jersey, USA
Distribution: SuSE
Posts: 492
Rep:
|
What distro are you using?
I would waste 1-2 Gb on swap, 10 Gb on /home, 20 Gb on /srv, 10 Gb for your MySQL root directory, and the rest on /
But I'm also insane...
That being said, I've never found a serious issue with SuSE's default partitioning for "Server" setup for a LAMP (+ more) server with few users.
|
|
|
10-04-2006, 04:49 PM
|
#3
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
OK, here's a rough guess (based on actual use on my system): - 3-5 G for /
- 3-5 G for /home
- 3-5 G for /usr
- 3-5 G for /usr/local
- 3-5 G for /opt
- 3-5 G for /var
- 3-5 G for /var/lib/mysql
There are five data bases in /var/lib/mysql -- one, containing world geographic information is about 100 M, Bugzilla with thousands of bug entries is about 100 M, too. The others are trivial at 10 M - 50 M each.
80 G is a lot of gig -- make each of the above 5 G and you've managed to use 35 G; if you know that your MySQL data base will be much larger than 100 M, double /var/lib/mysql to 10 G and be comfortable.
Most of the above actual use is 2.5 G or so, /usr is just under 3 G; 5 G each will cover all the bases and leave you a couple of spare partitions for "hot" back up and the like.
Oops, forgot swap -- make that 2x your RAM and you'll be safe.
Last edited by tronayne; 10-04-2006 at 04:51 PM.
|
|
|
10-04-2006, 05:08 PM
|
#4
|
Senior Member
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905
Original Poster
Rep:
|
Quote:
Originally Posted by tronayne
OK, here's a rough guess (based on actual use on my system): - 3-5 G for /
- 3-5 G for /home
- 3-5 G for /usr
- 3-5 G for /usr/local
- 3-5 G for /opt
- 3-5 G for /var
- 3-5 G for /var/lib/mysql
There are five data bases in /var/lib/mysql -- one, containing world geographic information is about 100 M, Bugzilla with thousands of bug entries is about 100 M, too. The others are trivial at 10 M - 50 M each.
80 G is a lot of gig -- make each of the above 5 G and you've managed to use 35 G; if you know that your MySQL data base will be much larger than 100 M, double /var/lib/mysql to 10 G and be comfortable.
Most of the above actual use is 2.5 G or so, /usr is just under 3 G; 5 G each will cover all the bases and leave you a couple of spare partitions for "hot" back up and the like.
Oops, forgot swap -- make that 2x your RAM and you'll be safe.
|
Do I need a /tmp directory? You listed /var/lib/mysql but I don't understand, do I make a seperate partion for each 3 /var - lib - sql? How do I make that in the moun tpoint section of partitioning?
|
|
|
10-04-2006, 05:52 PM
|
#5
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
Quote:
Originally Posted by Carlwill
Do I need a /tmp directory? You listed /var/lib/mysql but I don't understand, do I make a seperate partion for each 3 /var - lib - sql? How do I make that in the moun tpoint section of partitioning?
|
At some point before or during installation of your distribution, you should be asked or required to set up disk partitioning (size, file system type), possibly with a GUI, possibly manually (with cfdisk or fdisk). Using these tools, you define the number and size of the disk partitions. Once installation begins; i.e., when you're actually installing the distribution software, you should be shown the partitions and asked where you would like each mounted -- the installation process will, most likely, recognize your swap partition (you don't mount that), then ask you in order for each of your partitions (most likely, root [/] will be the first one you're asked about).
Say the installation asks about /dev/sda2 (if it's a SATA drive) or /dev/hd2 (if it's an IDE) and wants you what you want to mount that partition as. You'd enter, say, /usr. Then you'd be asked about the next one and you'd enter /usr/local. The next one might be /opt, Next /var, next /var/lib/mysql and so on.
You're creating logical spaces on your disk drive that will be formatted and have a given file system built on them and then mounted as a specific directory (mounted means as a subdirectory or file tree off the root directory). Give your distribution documentation a read about this.
The /tmp directory doesn't really need to be separate from the root partition (especially in a system as you've described -- remember that the root directory is mounted on a partition as / and all other partitions are mounted to that, thus /usr, /usr/local, /home and so on.
The reason for /var/lib/mysql is that it separates your data base from the /var tree and, if your data base starts growing toward the size of the partition you've defined for /var/lib/mysql, you can either copy the data base to a large spare partition or install a second drive and mount either to /var/lib/mysql.
|
|
|
10-05-2006, 01:05 AM
|
#6
|
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,797
|
You're talking about non-critical. In that case I would keep it simple.
The golden rule for 'swap' is 1.5 .. 2x the size of your memory. However there is no need to have more than 1 GB swap space (some even say 512MB).
'/' will contain nearly everything (os/apss). Most stuff in there is static, but logs will grow. I run a slackware 10.1 LAMP server with X installed as well as the leightweight window managers; no KDE or GNOME). It takes less than 2 GB. Allow some space for updates and additional software.
Further you need space for logs and other stuff that resides in '/var'. I would settle for 10 GB.
The rest will be used for '/home'. This will be used for user home directories and I would create a mysql subdirectory in there as well where the database(s) will reside.
The advantage of a simple scheme is that you don't waste space. The more partitions, the bigger the chance that somewhere along the line a partition might need more space that is not available while other partitions have plenty space left.
You obviously can finetune this. Most logs are in '/var'. In above scheme '/var' is part of '/'. That is the first thing that I would create a seperate partition for when I'm finetuning.
The suggested 3-5 GB should be sufficient. This will be at the cost of '/' in the above schema.
The next 'improvement' will be to create a separate '/mysql' partition; the required space will be at the cost of the '/home' partition. The sizes now start depending on how the server is used. If it's more dedicated to database, you should allocate a lot of space for the database. If it's a server for webhosting, you probably want a lot of space for users.
Last edited by Wim Sturkenboom; 10-05-2006 at 01:10 AM.
|
|
|
All times are GMT -5. The time now is 08:58 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|