Louis Hinman wrote: > To learn Liunx networking, I am going to set up a web server Well, a web server is just a component and it does > To this end, I am installing Debian 5.0 on a Dell Dimension 4100 > with a 250 MB HD. 250 Megabyte? Or 250 Gigabyte? A small installation will easily fit within 200MB. But that is getting harder for the novice to do as code bloat is settling into everything and the default is to install more than you need. > On my desktop, I have partitioned my HD as follows: > > /root > /swap > /home > /usr/local > /opt > > What would be an appropriate partition scheme for my web server? For the novice putting everything into one partition is often easiest. It is simple. You don't have to plan ahead very much for it. But when you run out of disk space you run out of it everywhere. For example if the filesystem is completely full then /var/log/syslog won't be able to log any problems and /var/spool/postfix (or exim or whatever) won't be able to send you email notifying you of problems. Therefore many people myself included like to separate the volumes to isolate functionality. This can keep email flowing even when other parts of the system are blocked by a full disk. Also disks are getting very large these days. Putting 2T into one filesystem works fine. But when or if a problem occurs then it occurs across a 2T filesystem and can be very painful to work with while trying to correct problems. Almost anything dealing with large filesystems take a long time. Therefore sizing to a better fit size with several smaller filesystems can optimize disaster recovery. I use LVM to enable me to fit sizes better and to grow (or shrink) as needed. Since I use LVM, LVM with RAID, LVM with encrypted partitions, and other configurations I always set up /boot on its own ext2 partition. I am currently consuming between 30M and 90M on various machines in /boot so anything 100M or larger would be fine. That is so small that there isn't any real gain by using ext3 or ext4 and with the journal it is worse. Using ext2 keeps it simple for the bootloader and is well supported. I always set /var up on a separate partition. This enables logs to be recorded and email to be transfered even if other parts of the filesystem become full. The size needed will vary with your particular use of it. Since I use LVM I can expand and contract it after installation and so am not locked to the installation size. I usually install a 3G /var partition. If it is just myself using the machine than /boot, /var and / might be plenty enough. But if there are multiple users then I always set up /home and potentially individual user partitions. Some users are disk hogs. The steady state of filesystems is full. I keep disk hog users on their own partition and then they don't negatively impact everyone else on the system. I find using LVM and partitions easier than user quotas. With LVM it is easy to create and size custom partitions. (Side Note: I like xfs but you can't downsize a partition. So I have been using ext3 for the most part which supports both upsizing and downsizing on the fly.) If you are going to use /usr/local/* or /opt/* for your own purposes then by all means feel free to set up partitions for them. I don't usually need those on my systems. On Debian /opt isn't normally used. It is completely a local option to use it. This is the opposite of some commercial Unix systems. For me every server almost always has one or more chroots set up on them. Each chroot is a little system and so could have their own individual partitions. But I find that using one partition for /srv and setting up /srv/chroot/* is usually sufficient for my needs. Then if the /srv/chroot/sid/var/ fills up it again doesn't cause global problems on the rest of the system. Summary: Here is my recommendation. /boot 200M as ext2 /var 3G / Size As Needed /...others... Set Up As Needed Keep some free blocks reserved in LVM ready to deploy when needed. Set up additional partitions as you need them. Stay flexible. There is no one true correct answer and many admins will have their own individualized recipes. As long as I am here I should mention that Linux memory overcommit should also be factored into setting up a server for reliability and sizing swap and virtual memory needs follow. I have previously posted on this before so instead of repeating myself again just let me say please go read these previous postings about the avoiding the OOM Killer. http://lists.debian.org/debian-user/2007/08/msg00022.html http://lists.debian.org/debian-user/2008/04/msg02554.html Bob
Attachment:
signature.asc
Description: Digital signature