filesystems(5) UNIX System V (Concepts) filesystems(5) NAME Filesystems - What and Where DESCRIPTION A disk has partitions. One partition, usually called the volume header, may be set aside for system purposes, e.g. containing the partition or logical volume descriptions or boot programs. It is set by the dvhtool, fx, lvint or xlv_admin programs, e.g. A partition is a region of a disk. It is set up by the fx program. e.g. A logical volume is a collection of partitions which can be used as a partition. It is set up by the lv or xlv facilities, e.g. A file system is a data structure. It may be resident in permanent random-access storage such as a disk. It may be created dynamically from data over a network, such as NFS, AFS or RFS. It may be created dynamically by the operating system itself from data available to the system, such as proc. A file system that is resident within a partition or logical volume managed by the operating and may presents file system objects such as regular files, directory files, symbolic links, character and block special files, named pipes and named sockets. It is setup by mkfs, e.g., and further developed by kernel facilities such as open, close, link, unlink, mknod. It contains its own description with such data as its size, where the inodes are stored and which storage units (blocks) are available. Its size may be smaller than the partition or logical volume that it resides within. A file system contains one or more tables associating filename components to file system object descriptions called inodes. The format of the filename components, what types of file system objects that are supported and whether multiple levels of tables are permitted is dependent on the file system type. A inode contains such as data as the type of file system object; access permissions; ownership; group association; size; times of reading, data modification and control modification; A regular file is a data structure of blocks which contains the file's data. A symbolic link is a kernel managed special file which specifies the name of another file system object. When file system object look up encounters a symbolic link, if the Page 1 (printed 12/13/97) filesystems(5) UNIX System V (Concepts) filesystems(5) named file system object exists, it is substituted for the symbolic link. A file system object may have more than one directory entry indicating its description (inode). Such a file system object is said to be hard linked. Its description contains a count of such links. A device special file's inode supplies a device number with two components. The type of device special file and its major number within the device number identify a method of management and a device, partition or logical volume. The minor number identifies a specific instance and may further qualify the method of management. The operating system kernel provides file system object look up services. Each process has a directory that is used to look up file system objects with names starting with a slash, called the root directory and a directory that is used to look up file system objects with names not starting with a slash called the current working directory. These directories may be changed for a process by chroot and chdir (cd) respectively. A process inherits these definitions from its parents when it is created. The first system process created is created with these directories being the root directory of the boot disk. A file system object is deleted from a file system when it not longer has a name, i.e. its link count is zero, and it is no longer being referenced by the kernel or some process. If a process terminates, then any references it has closed. The inode is zeroed and the blocks are returned to the available block pool for that file system. This makes it very difficult to rebuild a deleted file. The root file system is attached to the operating system at boot time. In most variants of the UNIX operating system, it can not be detached. Other file systems can be attached at points within a file system already attached to the operating system. In most, if not all, UNIX variants, these points in the file system must be directory file system objects. These attachments and detachments are done by mount and umount, e.g. Due the single directory tree image of file system object access of the UNIX operating system, almost all programs running on a UNIX operating system are quite insensitive how many file systems a running UNIX operating system has and where they are mounted. Historically, because of the sizes, performances and costs Page 2 (printed 12/13/97) filesystems(5) UNIX System V (Concepts) filesystems(5) of disks, most UNIX systems had at least two disks, one which was small and fast from which the system booted and a large slow disk for user code, data and applications called /usr. As a result of a drive to simplify system administration in some sense, with the availablility of large fast disks, /usr might be collapsed into the root (/) file system. AUTHOR Randolph J. Herber. Page 3 (printed 12/13/97)