Virtual file systems are memory-based file systems that provide access to special kernel information and facilities. Most virtual file systems do not use file system disk space. However, Cache File Systems use a file system on the disk to contain the cache, and some virtual file systems, such as the Temporary File System, use the swap space on a disk.
The Cache File System (CacheFSTM) can be used to improve performance of remote file systems or slow devices such as CD-ROM drives. 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. See Chapter 29, The Cache File System (Tasks) for detailed information on setting up and administering Cache File Systems.
The Temporary File System (TMPFS) uses local memory for file system reads and writes. Access to files in a TMPFS file system is typically much faster than to files in a UFS file system. Files in the temporary file system 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 system software. You can copy or move files into or out of the /tmp directory, just as you would in a UFS file system.
Using TMPFS file systems 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. The operating system generates a lot of disk or network activity while manipulating these files. Using TMPFS to hold these temporary files may significantly speed up their creation, manipulation, and deletion.
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 a regular file system can fill up.
Because TMPFS allocates swap space to save file data (if necessary), some programs may not be able to execute because there is not enough swap space.
See Chapter 27, Creating File Systems (Tasks) for information on how to create TMPFS file systems. See Chapter 30, Configuring Additional Swap Space (Tasks) for information about increasing swap space.
The Loopback File System (LOFS) lets you create a new virtual file system so you can access files by using an alternative path name. For example, you can create a loopback mount of root / onto /tmp/newroot. The entire file system hierarchy looks like it is duplicated under /tmp/newroot, including any file systems mounted from NFS servers. All files are accessible either with a path name starting from /, or with a path name starting from /tmp/newroot.
See Chapter 27, Creating File Systems (Tasks) for information on how to create LOFS file systems.
The Process File System (PROCFS) resides in memory. It 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. The following example shows a partial listing of the contents of the /proc directory:
$ ls -l /proc total 144944 -rw------- 1 root root 0 Dec 19 15:45 00000 -rw------- 1 root root 196608 Dec 19 15:45 00001 -rw------- 1 root root 0 Dec 19 15:45 00002 -rw------- 1 root root 1028096 Dec 19 15:46 00073 -rw------- 1 root root 1445888 Dec 19 15:46 00091 -rw------- 1 root root 1142784 Dec 19 15:46 00093 -rw------- 1 root root 1142784 Dec 19 15:46 00095 -rw------- 1 ignatz staff 1576960 Dec 19 15:50 00226 -rw------- 1 ignatz staff 192512 Dec 19 15:51 00236 -rw------- 1 ignatz staff 1269760 Dec 19 15:52 00240 -rw------- 1 ignatz staff 6090752 Dec 19 15:52 00241 -rw------- 1 ignatz staff 188416 Dec 19 15:52 00247 -rw------- 1 ignatz staff 2744320 Dec 19 15:52 00256
Do not delete the files in the /proc directory. Deleting processes from the /proc directory is not the best way to 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 system administration.
These additional types of virtual file systems are listed for your information. They do not require administration.
FIFOFS (first-in first-out) - Named pipe files that give processes common access to data
FDFS (file descriptors) - Provides explicit names for opening files using file descriptors
NAMEFS - Used mostly by STREAMS for dynamic mounts of file descriptors on top of files
SPECFS (special) - Provides access to character special and block devices