The root Filesystem


The Linux filesystem is logically one large directory structure. In a default install of SLES, unless otherwise specified, the entirety of the file structure is placed on a single disk partition. Because the / partition is the parent to all other portions of the filesystem, it is called the root. When a system is originally installed, the root is populated by directories only. The following directories are present by default:

 Athena:~ # ls / .   bin   dev  home  media  opt   root  srv  tmp  var ..  boot  etc  lib   mnt    proc  sbin  sys  usr 

In Linux, you can add additional disk capacity to a system. To do this, you attach the new disk by mapping its contents into the directory tree and providing a unique directory from which it can be accessed. This directory is called a mount point. Adding disk capacity is identical to adding removable media to the system and temporarily associating it with the /mnt directory. In the case of a permanent mount, the disk information is associated with the mount point in /etc/fstab.

In essence, any directory on the system can be associated, either temporarily or permanently, to additional storage. The root of the filesystem is bound to the selected target disk at install time. All the other directories under the root, however, are considered not only directories but possible mount points. In Chapter 2, "Updating the Server," we discussed the addition of extra storage and how it was possible to migrate the contents of /home and /srv from simple directories and convert them to individual disk partition mount points. Table 7.2 lists the directories in the root and summarizes their purpose.

Table 7.2. Default Mount Points

MOUNT POINT

PURPOSE

/bin, /sbin

These two directories contain the programs executed when you type Linux commands.

/boot

This directory structure contains the information processed by the boot loader.

/etc

This is the main configuration directory used by the system. It contains most of the configuration files for the standard services as well as the information required for the different runlevels.

/dev

dev contains all the special files needed for the system to recognize the devices connected to the system and the different access methods available for each.

/home

This is where user accounts should be created. It is also one of the most dynamic directory structures and is therefore a prime candidate for segregation to a separate physical device.

/lib

This directory is the main repository for libraries and system modules.

/media

This is the default mountpoint directory for removable media. Media is mounted off subdirectories such as dvd and floppy.

/mnt

This is the default generic mount point provided by the system. It can be used to quickly connect a CD-ROM or USB device without requiring the creation of a mount point directory.

/opt

This directory houses additional optional software and third-party layered applications.

/proc

This system directory tracks all the processes and system resources. This directory should be left as is; it does not grow very large and is mandatory for a properly functioning system.

/root

This is the "home" directory for the root account.

/srv

This service directory contains the default target (home) locations for the FTP and HTTP services.

/sys

This directory maintains a list of devices currently connected to the system and how they are accessed.

/tmp

This directory stores all the volatile temporary files created by processes at runtime.

/usr

Similar to bin and sbin, this directory mostly houses executables that can be accessed by the end user.

/var

This directory holds additional files that are dynamic in nature. The system stores many of the process log files here. Because this is such a dynamic environment, it is an ideal candidate for moving to a separate large partition.


All these mount points are candidates for conversion to separate physical devices. It is important to note that if the root partition becomes full, the system will no longer be able to log activity or create any temporary files and will simply cease functioning until it can resume these two tasks. It is therefore imperative to prevent this from happening by segregating the more dynamic directory structures, such as /srv, /var, and /home, onto separate physical partitions. Segregating the structures alleviates disk space contention on the root volume. As the system matures, growth of the individual mount points will also be easier to monitor.



    SUSE LINUX Enterprise Server 9 Administrator's Handbook
    SUSE LINUX Enterprise Server 9 Administrators Handbook
    ISBN: 067232735X
    EAN: 2147483647
    Year: 2003
    Pages: 134

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net