Now that decisions about swap size are as clear as mud, let's see if Linux partition sizes are any easier to determine. The base system takes slightly less than 20 MB of disk space, while the ``standard'' installation consumes somewhat more than 200 MB of disk space. A ``complete'' installation may exceed 400 MB, but doesn't need to go on one partition. Here is where the first decision must be made. Is the whole installation going to go on one partition? Well, if there is one physical drive large enough, what reason would there be to create more than one large partition? (Leaving room for a swap partition, of course.) There are, of course, several. Consider two of the most likely. First, control of the user's consumption of disk space. If /home is contained on the root partition the user disk consumption can consume all but 5% of the available disk space choking off all disk use except by the root account. This 5% is set aside for root privilege specifically so this event would not kill system activity. Root can then remove the offending files and return the machine to usefulness. Placing /home on another partition allows that partition to contain only the space you wish to give to user activity, rather than the complete root partition. This means that even when users have exhausted their disk space the rest of the system has plenty to continue servicing other processes needs. The system continues happily along, oblivious of the plight of the poor user. This is, of course, very useful when the same platform is supporting both user activity and serving web pages. Having users plug up the web server is highly undesirable. There are also other solutions to this problem, such as the quota package, found in the admin section but, this is a complete hardware solution requiring no additional software or configuration-management.
Second, control over the contents of /usr. Many systems do this by making /usr read-only. The simplest way to accomplish this is to put /usr on its own partition and mount it read-only. When the system administrator wants to add something to /usr the partition gets re-mounted read-write, the changes get made and the partition gets re-mounted read-only. This partition could just as easily be on a CD-ROM which would guarantee the read-only nature of the file system. Of course any changes to /usr would require re-mastering the CD.
Similar arguments can be made for placing
/var,
/tmp, and
possibly others on their own partition. Controlling use of these areas by
limiting their disk space to a specific partition size is a common way to
manage disk resources.
Let's see if this can be made clearer with a couple of examples. These
examples will all be based on a 2 GB IDE hard disk, but the principles
translate to SCSI and other disk devices as well. The first example is very
simple, while the second is much more complex.