Temporary File System
The temporary file system (TMPFS) uses local memory for file system reads and writes, which is typically much faster than a UFS file system. Using TMPFS can improve system performance by saving the cost of reading and writing temporary files to a local disk or across the network. For example, temporary files are created when you compile a program, and the operating system generates a lot of disk activity or network activity while manipulating these files. Using TMPFS to hold these temporary files can significantly speed up their creation, manipulation, and deletion.
Files in TMPFS file systems are not permanent. They are deleted when the file system is unmounted and when the system is shut down or rebooted.
TMPFS is the default file system type for the /tmp directory in the Solaris operating environment. You can copy or move files into or out of the /tmp directory, just as you would in a UFS file system.
The TMPFS file system uses swap space as a temporary backing store. If a system with a TMPFS file system does not have adequate swap space, two problems can occur:
The TMPFS file system can run out of space, just as regular file systems do.
Because TMPFS allocates swap space to save file data (if necessary), some programs might not execute because of insufficient swap space.
For information about creating TMPFS file systems, see Chapter 38, Creating File Systems (Tasks). For information about increasing swap space, see Chapter 41, Configuring Additional Swap Space (Tasks).
The Loopback File System
The loopback file system (LOFS) lets you create a new virtual file system so that you can access files by using an alternative path name. For example, you can create a loopback mount of root (/) on /tmp/newroot, which will make the entire file system hierarchy look like it is duplicated under /tmp/newroot, including any file systems mounted from NFS servers. All files will be accessible either with a path name starting from root (/), or with a path name that starts from /tmp/newroot.
For information on how to create LOFS file systems, see Chapter 38, Creating File Systems (Tasks).
Process File System
The process file system (PROCFS) resides in memory and contains a list of active processes, by process number, in the /proc directory. Information in the /proc directory is used by commands like ps. Debuggers and other development tools can also access the address space of the processes by using file system calls.
Caution - Do not delete the files in the /proc directory. The deletion of processes from the /proc directory does not kill them. Remember, /proc files do not use disk space, so there is little reason to delete files from this directory.
The /proc directory does not require administration.
Additional Virtual File Systems
These additional types of virtual file systems are listed for your information. They do not require administration.
Commands for File System Administration
Most commands for file system administration have both a generic component and a file system-specific component. Whenever possible, you should use the generic commands, which call the file system-specific component. The following table lists the generic commands for file system administration, which are located in the /usr/sbin directory.
Table 37-1 Generic Commands for File System Administration
Command | Man Page | 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) | Debugs the file system | |
fstyp(1M) | Determines the file system type | |
labelit(1M) | Lists or provides labels for file systems when they are copied to tape (for use by the volcopy command only) | |
mkfs(1M) | Creates a new file system | |
mount | mount(1M) | Mounts local and remote file systems |
mountall(1M) | Mounts all file systems that are specified in the virtual file system table (/etc/vfstab) | |
ncheck(1M) | Generates a list of path names with their inode numbers | |
mount(1M) | Unmounts local and remote file systems | |
mountall(1M) | Unmounts all file systems that are specified in a virtual file system table (/etc/vfstab) | |
volcopy(1M) | Creates an image copy of a file system |
How File System Commands Determine the File System Type
The generic file system commands determine the file system type by following this sequence:
From the -F option, if supplied.
By matching a special device with an entry in the /etc/vfstab file (if special is supplied). For example, fsck first looks for a match against the fsck device field; if no match is found, it then checks the special device field.
By using the default specified in the /etc/default/fs file for local file systems and in the /etc/dfs/fstypes file for remote file systems.
Manual Pages for Generic and Specific Commands
Both the generic commands and specific commands have manual pages in the man Pages(1M): System Administration Commands. The manual page for the generic file system commands provide information about generic command options only. The manual page for a specific file system command has specific information about options for that file system. To look at a specific manual page, append an underscore and the abbreviation for the file system type to the generic command name. For example, to see the specific manual page for mounting a UFS file system, type the following:
$ man mount_ufs |
The Default Solaris File Systems
The Solaris UFS file system is hierarchical, starting with the root directory (/) and continuing downwards through a number of directories. The Solaris installation process enables you to install a default set of directories and uses a set of conventions to group similar types of files together. The following table provides a summary of the default Solaris file systems.
Table 37-2 The Default Solaris File Systems
The root (/) and /usr file systems are needed to run a system. Some of the most basic commands in the /usr file system (like mount) are included in the root (/) file system so that they are available when the system boots or is in single-user mode and /usr is not mounted. For more detailed information on the default directories for the root (/) and /usr file systems, see Chapter 43, UFS File System (Reference).
Swap Space
The Solaris operating environment uses some disk slices for temporary storage rather than for file systems. These slices are called swap slices, or swap space. Swap space is used as virtual memory storage areas when the system does not have enough physical memory to handle current processes.
Since many applications rely on swap space, you should know how to plan for, monitor, and add more swap space when needed. For an overview about swap space and instructions for adding swap space, see Chapter 41, Configuring Additional Swap Space (Tasks).
The UFS File System
UFS is the default disk-based file system in Solaris operating environment. Most often, when you administer a disk-based file system, you will be administering UFS file systems. UFS provides the following features:
For detailed information about the UFS file system structure, see Chapter 43, UFS File System (Reference).