Filesystem Types A Few Other Filesystem Issues

A mount−point directory type A filesystem type opts Are comma−separated filesystem options freq A number indicating backup strategy for the filesystem passno A number indicating the fsck order for the filesystem The content of the etcmtab file on SunOS is presented to illustrate the previous information: cat etcmtab devsd0a 4.2 rw,dev=0700 1 1 devsd0g usr 4.2 rw,dev=0706 1 2 devsd0h home 4.2 rw,dev=0707 1 3 indigo1:indigo1 indigo1 nfs rw,bg,intr,hard,dev= 8200 0 0 hcprophet:hcprophet hcprophet nfs rw,bg,hard,intr,dev= 8203 0 0 This is the filesystem status file for the same system for which the filesystem configuration file etcfstab was shown earlier. If we compare the two files, and assume the filesystems were mounted automatically during the system startup, we can conclude: All local filesystems are mounted. • The floppy diskette was not inserted at the startup time, so the pcfs filesystem is not mounted. • One of the nfs filesystems is not mounted, obviously because a connection with the remote host rs01−ch was not established at that time it is a logical to speculate that the remote host was not reachable, although there could be a number of other reasons for mounting to fail. •

5.5 A Few Other Filesystem Issues

For a better understanding of UNIX filesystems, let us make a brief overview of several other filesystem issues. The most intriguing issue is how many different UNIX filesystems exist. We will try to describe the actual situation in this area. We will also address another extremely important topic related to the UNIX, the topic that affects both the operating system itself and disk usage. This is swap space and its usage on a UNIX platform — this time from the angle of the UNIX filesystem organization. Finally, a more detailed description of one pseudo filesystem is presented, just to clarify mysteries around these filesystem types.

5.5.1 Filesystem Types

The filesystem type is determined by a logical organization of the filesystem within the storage entity, or more specifically, by the filesystem layout. The filesystem layout will be elaborated in greater detail in the next chapter. Different filesystem types are mutually incompatible. Each filesystem type has a different organization and allows a different approach to its system data and existing files. This does not mean that different filesystem types cannot coexist within the same UNIX implementation; it means that the OS has to support all of the implemented filesystem types. The core of each filesystem is its superblock, a collection of filesystem tables, index nodes, and other system data that uniquely identify the filesystem. Creating a filesystem primarily means 128 Nowadays vendor−specific UNIX filesystems are dominant. The typical System V filesystem type, known as s5, has practically disappeared. The superior BSD−like filesystems prevailed, with many additions and improvements introduced by different vendors. Currently, the most common local UNIX filesystem type, supported by a number of UNIX vendors, is ufs UNIX filesystem. However, many other flavor−specific filesystem types are also in use: hfs • On the HP−UX platform efs • On the IRIX platform ext2 • On Linux platform jfs • Journaled filesystem, introduced by AIX, but also implemented on other platforms. jfs has some advantages; it is more robust in the face of filesystem corruption because a journal of filesystem activities enables a rollback of incomplete transactions to maintain filesystem data consistency 4.2 • An improved filesystem introduced with BSD 4.2 UNIX, and widely used on the SunOS platform a real ancestor of the ufs filesystem vxfs • Veritas filesystem, an improved journaled filesystem version with a number of beneficial filesystem characteristics Other implemented local filesystem types are: afs • Andrew filesystem, provides some additional flexibility, especially regarding remote filesystem sharing hsfs • High Sierra filesystem, typical for CD−ROM media cdfs • CD−ROM filesystem pcfs • PC filesystem FAT filesystem, implemented for DOS−formatted floppy diskettes cachefs • Cache filesystem, allows use of local disk space to cache frequently−used data from a CD−ROM or a remote filesystem There are also a number of specific, pseudo filesystem types supported by different UNIX flavors: tmpfs • Temporary filesystem, a temporary file storage in memory that swaps to bypass the overhead of writing into a disk lofs • Loopback filesystem, a virtual filesystem to approach files using different pathnames it is discussed in more details later in this section tfs • Translucent filesystem, allows mounting of a filesystem on top of existing files mount−point does not have to be an empty directory swapfs • Swap filesystem, used by the kernel to manage swap space proc • Process access filesystem, allows access to active processes and their images specfs • Special filesystem, allows access to the special device files 129 nfs • Network filesystem, widely used on all UNIX platforms rfs • Remote file share filesystem, typical for System V and barely in use autofs • Automount filesystem, an NIS−based automounted NFS filesystem Some of the listed types are barely in use, while others are widely used. This relatively long list also is not, by any means, a complete list. In this chapter we will discuss strictly local UNIX filesystems; network filesystems will be discussed separately. We mentioned earlier the swap partition and its crucial role on the UNIX platform. The swap partition definitely deserves more than this brief statement. A more detailed overview follows.

5.5.2 Swap Space — Paging and Swapping