sections in this module | City
College of San Francisco - CS260A - Unix/Linux System
Administration Module: Filesystems I |
module list |
There are many reasons why multiple filesystems are advantageous. There are also some disadvantages. We will begin by listing the advantages in decreasing order of importance:
Size limitation: The size of the portion of a filesystem that resides on a separate partition is limited by the size of the partition. Thus, areas of the filesystem which may allow unbounded creation of files should be placed on a separate physical filesystem so that their growth does not compromise the rest of the system. Examples of such areas are:
Efficiency: Frequent updating of data causes data fragmentation and disk randomization. Isolation of system data on a separate physical filesystem ensures that when the system needs space, the space is less fragmented and is not intermingled with user data.
Ease of backup: Some backup programs function on a filesystem by filesystem basis. User data, of course, needs to be backed up much more frequently than the more static system data.
Flexibility: Any
non-root
filesystem can easily be moved to another system and attached to
their
filesystem if necessary. In addition, different physical
filesystems
can employ different filesystem parameters, such as blocksize,
based on
their use, or even be formatted in a different filesystem type.
Last,
some filesystem parameters, such as the use of access-control lists
must be applied on an entire physical filesystem. Such parameters
may
be appropriate for user files but not system files, or vice-versa.
One
unusual, but useful, advantage to multiple filesystems is creating
a
data partition to share between several bootable systems. On my
system,
for example, /doc
is a partition that may be mounted on two different systems at
boot.
You could also share a partition for downloaded special programs.
Typical locations for this are at /opt or /usr/local
Besides complexity, the single most significant disadvantage of using multiple filesystems is sub-optimal space allocation. It is easy for a filesystem to be created with either more, or, more importantly, less, space than is eventually needed. Although there is a tool to resize a physical filesystem, it cannot resize it past the boundary of the parititon. This makes increasing the size of a filesystem usually difficult, unless there is free space following it. The only solution to this problem is to split the filesystem into two physical filesystems or to create a new larger partition to place it on. Both solutions involve temporarily denying access to the data while all or part of it is copied to the new location and the reconfiguration is complete.
As we will see later, logical volume managers provide all the important benefits of multiple physical filesystems while providing the ability to grow a filesystem without recreating it.
Common filesystem divisionsMost systems that are divided into multiple physical filesystems have at least /tmp and /var separated from /. Another common division is /home, which contains user data. On linux systems, /boot is also commonly on its own partition. /boot contains the most basic system startup components including the boot loader configuration files and the kernel.
In addition to 'real' partitions, modern Unix and linux systems should have a swap partition. This effectively multiplies the amount of 'virtual memory' available on the system. ('virtual memory' used like this is a PC-inspired misnomer)
Some filesystem divisions can be very inconvenient. The root filesystem is understood to contain everything necessary for a functioning system. Under no circumstances should /bin, /etc, /dev, /root, /lib or /sbin be on a different partition than the root. In addition, while it is traditional to place /usr on a separate partition, the dynamic libraries in /usr/lib and many files in /usr/share are now an integral part of the system, so this may no longer be a good idea. If the intention is to separate local data from system data, a separate partition may be mounted at /usr/local instead to house additional source and binary installations.
Find out what filesystems your Unix or linux system uses. The current filesystems can be displayed using the df command. If a filesystem device starts with the characters lv or vg or vol, the filesystem is probably a logical volume under the control of a logical volume manager. How many separate filesystems comprise your system's Unix filesystem?
Preview question: There are two types of disk formatting. The common use of the term today refers to high-level formatting. It is actually filesystem creation. Traditionally on a Unix system, formatting referred to low-level formatting. Research these two types of formatting on the Internet. Find out exactly what low-level formatting does. |
Prev | This page was made entirely
with free software on linux: the Mozilla Project and Openoffice.org |
Next |