View Full Version : FC2 Webserver partitioning scheme
12th June 2004, 03:46 PM
I'm trying to determine the best partioning scheme for a webserver and will also have a DB running on it as well(either PostgreSQL or MySQL).
I currently have 3 HDs (40GB, 20GB, 10GB) on the server.
I was thinking of using:
-the 40GB as the primary drive (/boot, /, etc...)
-the 20GB for backups
-the 10GB for swap and logfiles
Any ideas? I've also heard that it is a good idea to put /tmp on a seperate partition for security reasons.
Should any modifications be made to fstab such as making certain partitions load as read only, also for security reasons?
Thanks in advance.
13th June 2004, 03:48 AM
Both Apache's web root and the logs are under the /var filesystem. Perhaps when partitioning /var could be on the 10 GB drive.
/tmp really doesn't have security as far as I know. Anyone can write there. It's more a common place for programs to dump stuff.
You will probably just want to format the backup drive but only mount it on occasion for backups or restores.
13th June 2004, 04:05 AM
Personally, I would do:-
10GB / and everything excluding the following:-
20GB /var & /tmp
40GB /mnt/backup (mount as needed, capable of several full backups)
(mostly/only the 10GB drive is involved when upgrading your OS).
I would partition the 10GB (size to suit needs of /home) as follows:-
Of cource, it depends of what else you set this server up for. The above would be fine for my FC2 Intranet/Worstation needs. I use a server for package/downloads/master backups so my /home requirements are low. My FC2 install requires 6GB for the system, you cant afford too many partions for the 10GB drive, to / /boot and /home provides reasonable partitioning while not locking up valuable space in one partition that doesnt need it.
A heavily loaded server may benefit from seperating /var /tmp and / across 3 seperate drives, depending on the hard drive interface used. Master/Slave IDE on the same channel often dont benefit in this case. SCSI can be better here.
I use a few nice backup scripts on my workstation/server. The past 7 days /home backups are maintained. Also, weekly system (/etc, /spool, /boot, /usr/src). I can give you a peek at my cron scripts if you like, you can modify them to suit your needs, backup what you require.
You needs may vary.
24th June 2004, 07:50 AM
I decided to use your partitioning scheme but separate /usr as well.
I would like to take a look at your cron scripts if you don't mind. What do you use for your backups tar or cpio or do you use something else?
Here is the setup I ended up using
-On the 10 GB (hda)
--2GB / (reiserfs)
--6GB /usr (reiserfs)
--1.5GB /home (reiserfs)
--100MB /boot (ext3)
-On the 20GB (hdc)
--13GB /var (reiserfs)
--5GB /tmp (reiserfs)
I will post my fstab config later if it is of interest to anyone.
24th June 2004, 08:03 AM
While I was reading this I was wondering something. I'm not trying to hi-jack the topic, cause it should be a quick answer that people who have posted in this thread would be able to answer.
Why would you divide the filesystem across multiple drives? I went from Windows to OS X to now Linux, and then I could understand partitioning that way- to put files on different volumes (Windows- C:\ D:\; OS X- \Volumes\Home \Volumes\Backup). But what advantage do you have by writing a seperate partition, on the same drive, for your /home (or other) folder?
Feel free to yell if I should've started my own topic *shudders* Part of the reason I'm asking is because I too am interested in running a webserver so if I can learn of the advantages or using a similar parition scheme used by the posters.
26th June 2004, 06:27 AM
See the following post for interesting follow-up discussion on the topic
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.