Introduction to the UNIX Filesystem

Chapter 5: UNIX Filesystem Management

5.1 Introduction to the UNIX Filesystem

The UNIX filesystem is the widely accepted name for UNIXs hierarchical tree−structured directory organization, which holds all files merged together, enabling equal access to them regardless of their nature or type. Any file in the UNIX filesystem can be identified by its position in the tree in two ways: by an absolute file name, a full−path file name that starts from the root directory represented by ; or by a relative file name, which is relative to the current working directory. Since everything in UNIX is either a file or file−like, UNIX filesystem management is one of the most important administrative tasks. Good filesystem management is the key issue for successful UNIX administration; since most activities are related, in some way, to the filesystems, most problems are related to the filesystems, too. Sufficient knowledge and understanding of this topic is crucial for administration. The purpose of the following text is to help readers better understand UNIX filesystem issues. The system administrator is responsible for ensuring that users have access to the files they need, as well as for keeping those files uncorrupted and secure. Basically, administering the filesystem includes the following tasks: Making local and remote files available to users • Monitoring and managing file corruption, hardware failures, and user errors • Monitoring and preventing filesystem overloading and unrestricted file growths • Ensuring data confidentiality by limiting file and system access • Checking for, and correcting, filesystem corruption • Enabling a full data restore via a well−planned backup schedule • Connecting and configuring new storage devices when needed • Some of these tasks can be performed automatically like checking for filesystem corruption, while others are usually done manually on an as−needed basis. Some of these tasks are also discussed in greater detail in other chapters. When discussing the UNIX filesystem, two basic issues should be made clear: Filesystem visibility, i.e., how the UNIX filesystem is seen by users. The administrators duty is to provide this visibility. We will refer to this topic as UNIX Filesystem Directory Organization, and discuss it in this chapter. 1. Filesystem layout, i.e., how the UNIX filesystem is seen by the operating system itself, and how a selected file is found, opened, modified, or stored within the available disk space. How this jungle of files functions at all, and how to ensure that it works well at any time. We will refer to this topic as UNIX Filesystem Layout, and discuss it in the next chapter. 2. As with everything in UNIX, both filesystem topics are BSD or System V colored and the main UNIX filesystem types originate from the two basic UNIX platforms. However, the differences between the two platforms are such that the corresponding filesystem types are mutually incompatible. They differ in the way directories are organized, as well as in the filesystem layout; they differ also performance−wise. Despite differences, the filesystem layout and filesystem directory organization are relatively independent issues, and UNIX vendors are free to select the best of each filesystem type and combine and improve them, thereby making new higher−performance hybrid solutions. The 109

5.2 UNIX Filesystem Directory Organization