[Next] [Previous] [Up] [Top] [Contents]

CHAPTER 4 The UNIX File System

4.6 Disk Partitioning

In the old days you normally partitioned the disks to allow just a little more space than actually needed for system files. For file systems that were likely to grow, like /home and /usr/local, you made as large as possible while balancing your needs and resources. The root partition was expected to have few files that would change on a daily basis (/etc/passwd being the notable exception), and this was a good thing. With few files changing there was less likelihood that the file system would be corrupted. Disks were not as reliable as they are now. A problem arises, though, if you need to add more space to a partition. Most OSs won't let you transparently add this space. You normally have to back up the disk, repartition the drives, and restore the files from the backup.

As operating systems grew in size, and this was especially noticeable in the transition to Solaris, more files, and more changing files, were placed in the root partition. For example, by default the Solaris install put /var in root, but /var now changes considerably every time you add a new software package or install an OS patch. So the old idea of a small, little-changing root partition doesn't hold, unless you separate /var on another partition.

There has been a lot of discussion of this topic in the system administration newsgroups recently. For standalone machines it's probably most efficient to just have two partitions: one for swap, and one for everything else. For servers it's better to isolate the different types of files on separate partitions. Below I'll summarize many of the arguments for and against the two positions.

Disk Partitions
ArgumentSeparate PartitionsCombined Partitions
Proper SizeDifficult to maintainNo maintenance
Tape BackupsEasier with smaller partitionsHigher density tapes, stackers
Small Root PartitionLess chance of corruptionCan rebuild the OS quickly
Any Corrupted PartitionCan more easily restore that file systemCan boot diskless & rebuild the OS quickly
NFS File ServiceAllow different mount optionsOne mount option
QuotasSeparate quotas by partitionOne quota
SpaceCan run out of space on one partition while lots of space on othersStill has space available to users
Runaway ProgramsFills space only on that partitionFills all available space, this may shut down essential services, e.g. mail & logs

Unix System Administration - 8 AUG 1996
[Next] [Previous] [Up] [Top] [Contents]