3.1.11.1. Hard disk partition

Up one level

-

I prefer to use different partitions for different directory trees to limit damage upon system crash. E.g.,

     /          == (/ + /boot + /bin + /sbin)
                == 50MB+
     /tmp       == 100MB+
     /var       == 100MB+
     /home      == 100MB+
     /usr       == 700MB+ with X
     /usr/local == 100MB

The size of the /usr directory is very dependent on X Window applications and documentation. /usr/ can be 300MB if one runs a console terminal only, whereas 2GB–3GB is not an unusual size if one has installed many Gnome applications. When /usr/ grows too big, moving out /usr/share/ to a different partition is the most effective cure. With the new large prepackaged Linux 2.4 kernels, / may need more than 200MB.

For example, the current status of my Internet gateway machine is as follows (output of the df -h command):

     Filesystem            Size  Used Avail Use% Mounted on
     /dev/hda3             300M  106M  179M  38% /
     /dev/hda7             100M   12M   82M  13% /home
     /dev/hda8             596M   53M  513M  10% /var
     /dev/hda6             100M  834k   94M   1% /var/lib/cvs
     /dev/hda9             596M  222M  343M  40% /usr
     /dev/hda10            596M  130M  436M  23% /var/cache/apt/archives
     /dev/hda11            1.5G  204M  1.2G  14% /var/spool/squid

(The large area reserved for /var/spool/squid/ is for a proxy cache for package downloading.)

Following is fdisk -l output to provide an idea of partition structure:

     # fdisk -l /dev/hda # comment
     
     /dev/hda1             1        41    309928+   6  FAT16 # DOS
     /dev/hda2            42        84    325080   83  Linux # (not used)
     /dev/hda3   *        85       126    317520   83  Linux # Main
     /dev/hda4           127       629   3802680    5  Extended
     /dev/hda5           127       143    128488+  82  Linux swap
     /dev/hda6           144       157    105808+  83  Linux
     /dev/hda7           158       171    105808+  83  Linux
     /dev/hda8           172       253    619888+  83  Linux
     /dev/hda9           254       335    619888+  83  Linux
     /dev/hda10          336       417    619888+  83  Linux
     /dev/hda11          418       629   1602688+  83  Linux

A few unused partitions exist. These are for installing a second Linux distribution or as expansion space for growing directory trees.

(no ads!)