Solaris Transition Guide

Virtual File System Architecture

The SunOS release 5.7 software features a virtual file system (VFS) architecture that simplifies file system management for systems that support multiple file systems.

Over the years, several different UNIX file systems were developed, each with its own set of commands for file system management. Learning all the variations can be confusing and difficult. The SunOS release 5.7 software addresses this issue with a set of generic commands for file system management. These commands are a part of a common VFS interface that makes differences between file systems transparent with respect to maintenance. The subsections below provide a summary of supported file systems and the generic file system commands.

Supported File System Types

Most file system types included in the SunOS release 4 software are also included in the SunOS release 5.7 software. There is one exception: The translucent file system (TFS) type has been withdrawn from the SunOS release 5.7 software. Table 9-2 summarizes file-system type availability in the SunOS release 4 and SunOS release 5.7 environment.

Table 9-2 Summary of File System Types

Category 

Name 

Description 

SunOS release 4 

SunOS release 5.7 

Disk-based 

UFS

UNIX file system 

Yes 

Yes 

HSFS

CD-ROM file system 

Yes 

Yes 

PCFS

PC file system 

Yes 

Yes 

Network-based

NFS

Sun's distributed computing file system 

Yes 

Yes 

Pseudo

SPECFS

Device special file system 

Yes 

Yes 

TMPFS

/tmp temporary file system

Yes 

Yes 

LOFS

Loopback file system 

Yes 

Yes 

TFS

Translucent file system 

Yes 

No 

 

PROCFS

Process access file system 

No 

Yes 

 

FDFS

File descriptor file system 

No  

Yes 

 

FIFOFS

FIFO/Pipe file system 

No  

Yes 

 

NAMEFS

Name file system 

No 

Yes 

 

SWAPFS

Swap file system 

No 

Yes 

 

CACHEFS

Cache file system 

No 

Yes

For more information on file systems, see the proc(4) and fd(4) man pages and System Administration Guide, Volume I.

Cache File System (CACHEFS)

The Cache File System can be used to improve performance of remote file systems or slow devices such as CD-ROMs. When a file system is cached, the data read from the remote file system or CD-ROM is stored in a cache on the local system.

Swap File Changes

In the SunOS release 5.7 software, SWAPFS is the default swap device when the system boots or you create additional swap space. This swap device uses physical memory as swap space, but also requires physical swap space on a disk.

In SunOS release 4 systems, the default physical swap device depends on the system configuration. Standalone systems default to sd0b and diskless systems get their swap files from the bootparam server. The SunOS release 5.7 software uses the swap file as the default dump device instead of specifying a file on disk.

Unsupported SVR4 File System Types

Table 9-3 shows SVR4 file system types that are not supported in the SunOS release 5.7 software.

Table 9-3 Unsupported SVR4 File System Types

Name 

Description 

BFS

Boot file system 

S5

System V file system 

xnamefs

XENIX semaphore file system

Generic File System Commands

Most file system administration commands have a generic and a file system component. Use the generic commands, which call the file system component. Table 9-4 lists the generic file-system administrative commands, which are located in the /usr/bin directory.

Table 9-4 Generic File-System Administrative Commands

Command 

Description 

clri(1M)

Clears inodes 

df(1M)

Reports the number of free disk blocks and files 

ff(1M)

Lists file names and statistics for a file system 

fsck(1M)

Checks the integrity of a file system and repairs any damage found 

fsdb(1M)

File system debugger 

fstyp(1M)

Determines the file-system type 

labelit(1M)

Lists or provides labels for file systems when copied to tape (for use by the volcopy command only)

mkfs(1M)

Makes a new file system 

mount(1M)

Mounts file systems and remote resources 

mountall(1M)

Mounts all file systems specified in a file-system table 

ncheck(1M)

Generates a list of path names with their i-numbers 

umount(1M)

Unmounts file systems and remote resources 

umountall(1M)

Unmounts all file systems specified in a file-system table 

volcopy(1M)

Makes an image copy of a file system

Most of these commands also have a file system counterpart.


Caution - Caution -

Do not use the file system commands directly. If you specify an operation on a file system that does not support it, the generic command displays this error message: command: Operation not applicable for FSType type.


Syntax of Generic Commands

Most of these commands use this syntax:

command [-F type] [-V] [generic-options] [-o specific-options] [special|mount-point] [operands] 

The options and arguments to the generic commands are:

-F type

Specifies the type of file system. If you do not use this option, the command looks for an entry that matches special or mount point in the /etc/vfstab file. Otherwise, the default is taken from the file /etc/default/fs for local file systems and from the file /etc/dfs/fstypes for remote file systems.

-V

Echoes the completed command line. The echoed line may include additional information derived from /etc/vfstab. Use this option to verify and validate the command line. The command is not run.

generic-options

Options common to different types of file systems.

-o specific-options

A list of options specific to the type of file system. The list must have the following format: -o followed by a space, followed by a series of keyword [=value] pairs separated by commas with no intervening spaces.

special|mount-point

Identifies the file system. The name must be either the mount point or the special device file for the slice holding the file system. For some commands, the special file must be the raw (character) device; for other commands it must be the block device. In some cases, this argument is used as a key to search the file /etc/vfstab for a matching entry from which to obtain other information. In most cases, this argument is required and must come immediately after specific-options. However, the argument is not required when you want a command to act on all the file systems (optionally limited by type) listed in the /etc/vfstab file.

operands

Arguments specific to a type of file system. See the specific man page of the command (for example, mkfs_ufs(4) for a detailed description.

System-wide Default File System Type

The default remote file system type is /etc/dfs/fstype. The default local file system type is /etc/default/fs. See the default_fs(4) man page for more information.

Command Locations

In previous SunOS releases, all file system commands were located in the /etc directory. In the SunOS release 5.7 software, file system commands are organized into separate hierarchies for convenience. All of the file system commands are included in /usr/lib/fs/fstype. Commands needed before /usr is mounted are duplicated in /etc/fs/fstype.

The generic commands are located in /usr/sbin. The commands needed before /usr is mounted are duplicated in /sbin.

Table 9-5 lists the locations of the file-system commands.

Table 9-5 Locations of File System Commands

Type 

Location of Primary Version 

Location of Duplicate Version (root)

Generic 

/usr/sbin

/sbin

Specific 

/usr/lib/fs

/etc/fs

New UFS Mount Option

To ignore access time updates on files, you can specify the o noatime option when mounting a UFS file system. This option reduces disk activity on file systems where access times are unimportant (for example, a Usenet news spool).