Planning Disk Storage

One critical step you must take when planning your Linux installation is how you are going to partition your hard drive. There are several ways to accomplish this, each with its advantages, and its disadvantages.

To help you decide how to partition your disk, you will need to know something about the UNIX file system, specifically the directory structure:

Directory Purpose
/bin This directory holds the basic system utilities of any Linux/UNIX system
/sbin This directory hold basic system administration utilities, such as those for process control, user account administration, and device control
/etc This directory holds general system configuration files
/var
/tmp Temporary storage used by processes and system applications
/dev This directory holds files linked to actual and virtual devices
/usr This is a directory that holds a directory structure similar to the root directory, except that most applications you install on a Linux system are placed in subdirectories underneath this directory.
/home This is where normal users store their files.
/opt This directory holds everything specific to some large applications and desktop environments

Of course, /usr/local is sometimes used for installation of software from packages separate from what is supplied by the distribution. Usually, you would use this for packages you install from source.

The easiest way to do this is to allow the installer to do the partitioning for you. However, the easiest way if not always the best way.

The Red Hat/Fedora Core distributions have the system boot files stored in a separate partition, mounted as /boot. This is a good idea if you have a hard drive that is larger than your system was designed to handle. This ensures that older systems will be able to boot Linux by having the startup files located in an area where the hardware is able to access your hard drive.

The SimplyMEPIS distribution takes a much simpler approach. This distribution allocates one partition for swap space, and depending on whether you want /home to be separate from the rest of the installation, one or two partitions for the entire installation.

The swap area is kept separate from the rest of the Linux system on the hard disk. On Windows, a swap file, rather than assigning a separate disk partition, is used for swap space. This presents a potential problem where the swap file can grow so large as to fill up the logical drive (or physical partition) where Windows itself is stored. When this happens, the system will come to a halt and very bad things will happen.

Of course, this can happen on a Linux system if the swap partition is filled. However, with careful planning, this should never happen. I recommend a swap partition of three times the physical memory to ensure that even the most memory intensive applications will not crash your Linux system. Of course, if you plan to place a heavy workload on your Linux system, you should allocate as much as four times the physical memory. Ubuntu, Fedora, Red Hat Enterprise Linux and Novell OpenSuSE by default allocate twice the physical memory.

Some people prefer to have their data files stored in a different partition. This allows for easier system backups. Others prefer to have temporary files in a separate partition. While doing this may be a good idea, it is possible to crash your Linux system if you allocate too little disk space for temporary files (i.e. files created in the /var and /tmp directories, both of which are generally accessed by the Linux system itself). Ubuntu by default places everything in one partition, which is the safest way to allocate space for your Linux system (unless of course you have a hard drive whose capacity is greater than the capacity your system was designed to handle, in which case, you will need to create a partition containing the /boot directory before you create the root directory).

In general, you would want to give Linux itself enough disk space to work with. If you are going to create a separate partition for your data files, I recommend the following guidelines:

  • Allocate 1.4GB if you plan to burn CDs. This space includes 700MB for the CD image file, and 700MB for the data files you are going to put on that CD.
  • Allocate 9.4GB if you plan to burn DVDs. This space includes 4.7GB for the DVD image file, and 4.7GB for the data files you are going to put on the DVD.
  • Allow space for your documents, file downloads and uploads, music files, photographs, and for everything else you plan to do with your Linux machine.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License