Section 1.8. Files and File Systems


1.8. Files and File Systems

Solaris provides a framework under which multiple file system types are implemented: the virtual file system framework (VFS). Earlier implementations of UNIX used a single file system type for all mounted file systems; typically, the UFS file system from BSD UNIX. The virtual file system framework, developed to enable the network file system (NFS) to coexist with the UFS file system in SunOS 2.0, became a standard part of System V in SVR4 and Solaris OS.

Each file system provides file abstractions in the standard hierarchical manner with file access interfaces even if the underlying file system implementation varies. The file system framework allows almost any objects to be abstracted as files and file systems. Some file systems store file data on storage-based media, whereas other implementations abstract objects other than storage as files. For example, the procfs file system abstracts the process tree, where each file in the file system represents a process in the process tree. We can categorize Solaris file systems into the following groups:

  • Storage-Based File Systems. These are regular file systems that provide facilities for persistent storage and management of data. The Solaris UFS and PC/DOS file systems are examples.

  • Network File Systems. These provide files that appear to be in a local directory structure but are stored on a remote network server. An example is the network file system (NFS).

  • Pseudo File Systems. These present various abstractions as files in a file system. The /proc pseudo file system represents the address space of a process as a series of files.

The framework provides a single set of well-defined interfaces that are file system independent; the implementation details of each file system are hidden behind these interfaces. Two key objects represent these interfaces: the virtual file, or vnode, and the virtual file system, or vfs objects. The vnode interfaces implement file-related functions, and the vfs interfaces implement file system management functions. The vnode and vfs interfaces call appropriate file system functions depending on the type of file system being operated on. Figure 1.5 shows the file system layers. File-related functions are initiated through a system call or from another kernel subsystem and are directed to the appropriate file system via the vnode/vfs layer.

Figure 1.5. VFS/Vnode Architecture


Table 1.1 summarizes some of the major file system types that are implemented in Solaris.

Table 1.1. File Systems Available in Solaris File System Framework

File System

Type

Device

Description

ufs

Regular

Disk

UNIX Fast File system, default in Solaris

zfs

Regular

Disk

The new disk based file system in Solaris

qfs

Regular

Disk

High Bandwidth file system for Solaris, optionally with hierarchical storage management facilities

pcfs

Regular

Disk

MS-DOS file system

hsfs

Regular

Disk

High Sierra file system (CD-ROM)

tmpfs

Regular

Memory

Uses memory and swap

nfs

Network

Network

Network file system

cachefs

Pseudo

File system

Uses a local disk as cache for another NFS file system

autofs

Pseudo

File system

Uses a dynamic layout to mount other file systems

specfs

Pseudo

Device Drivers

File system for the /dev devices

procfs

Pseudo

Kernel

/proc file system representing processes

sockfs

Pseudo

Network

File system of socket connections

fdfs

Pseudo

File Descriptors

Allows a process to see its open files in /dev/fd

fifofs

Pseudo

Files

FIFO file system





SolarisT Internals. Solaris 10 and OpenSolaris Kernel Architecture
Solaris Internals: Solaris 10 and OpenSolaris Kernel Architecture (2nd Edition)
ISBN: 0131482092
EAN: 2147483647
Year: 2004
Pages: 244

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