Some things about the root filesystem:
- In general, filesystems are hierarchial structures containing stored objects.
- The root filesystem '/' can be pictured as a tree, its stored objects (other filesystems, directories and files) being represented as branches and leaves stemming from it's base/root.
- Do not confuse the root user's home directory (/root) with the root (/) filesystem.
- To use a filesystem it needs to be mounted.
- A filesystem is mounted on a mount point - a directory.
- The root filesystem is mounted on the root '/' directory.
- '/' is the top level directory. All other directories and filesystems are mounted below it (within the '/' directory).
- Every linux system has a '/' root directory.
- It is the first filesystem to be made available during boot.
The directories listed below '/' are always part of the root directory and include:
|/||Files and dirctories needed by boot|
|/bin, /sbin||Required system binaries|
|/etc||System configuration files|
The remaining directories can and usually are, created as separate filesystems in separate partitions. They include:
|/boot||Contains static files used by the boot loader - kernel image, GRUB, System.map, ramdisk images, ...|
|/home||User home directories|
|/usr||User commands, source, documentation, ...|
|/var||System and application log files|
Filesystems in general
- Filesystems may provide local or remote access. Remote access is often via a client to a fileserver using network protocols such as NFS, SMB or 9P.
- Users can also create their own filesystems such as /www for web files, /srv for third party server applications, /share ...
- Sub-directories can also be sub-divided into filesystems such as /usr/local/, /usr/src ....
- Logical volumes can be used to group disks and partitions.
Filesystem information nodes - inodes
- Information about each object within a filesystem is contained in an 'information node' (an inode).
- Multiple objects within the same filesystem can share the same inode (linking - hard or symbolic).
- Each linux ext2, ext3 and ext4 filesystem is created with a finite number of inodes based on the size of the filesystem.
- It is possible for a filesystem, if it contains a very high number of small files, to run out of inodes. A way to rectify this is to backup the filesystem and recreate it using
mke2fs -N num-of-inodes ...