![]() |
![]() |
| ||
How File System Commands Determine the File System TypeThe generic file system commands determine the file system type by following this sequence:
Manual Pages for Generic and Specific CommandsBoth 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:
The Default Solaris File SystemsThe 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 38-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 44, UFS File System (Reference). Swap SpaceThe Solaris operating system 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 42, Configuring Additional Swap Space (Tasks). The UFS File SystemUFS is the default disk-based file system in Solaris operating system. 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 44, UFS File System (Reference). UFS LoggingUFS logging bundles the multiple metadata changes that make up a complete UFS operation into a transaction. Sets of transactions are recorded in an on-disk log, and then applied to the actual UFS file system's metadata. At reboot, the system discards incomplete transactions, but applies the transactions for completed operations. The file system remains consistent because only completed transactions are ever applied. This consistency remains even when a system crashes, which normally interrupts system calls and introduces inconsistencies into a UFS file system. UFS logging provides two advantages:
The log is allocated from free blocks on the file system, and it is sized at approximately 1 Mbyte per 1 Gbyte of file system, up to a maximum of 64 Mbytes. The log is continually flushed as it fills up. The log is also flushed when the file system is unmounted or as a result of any lockfs command. UFS logging is enabled by default on file systems greater than 1 terabyte in size. If you need to enable UFS logging, specify the -o logging option with the mount command in the /etc/vfstab file or when you mount the file system manually. Logging can be enabled on any UFS file system. Also, the fsdb command now has new debugging commands to support UFS logging. In some operating systems, a file system with logging enabled is known as a journaling file system. Planning UFS File SystemsWhen laying out file systems, you need to consider possible conflicting demands. Here are some suggestions:
For information on default file system parameters as well as procedures for creating new UFS file systems, see Chapter 39, Creating File Systems (Tasks). UFS Direct Input/Output (I/O)Direct I/O is intended to boost bulk I/O operations. Bulk I/O operations use large buffer sizes to transfer large files (larger than 256 Kbytes). Using UFS direct I/O might benefit applications, such as database engines, that do their own internal buffering. Starting with the Solaris 8 1/01 release, UFS direct I/O has been enhanced to allow the same kind of I/O concurrency seen when accessing raw devices. Now you can get the benefit of file system naming and flexibility with very little performance penalty. Check with your database vendor to see if they can enable UFS direct I/O in their product configuration options. Direct I/O can also be enabled on a file system by using the forcedirectio option to the mount command. Enabling direct I/O is a performance benefit only when a file system is transferring large amounts of sequential data. When a file system is mounted with this option, data is transferred directly between a user's address space and the disk. When forced direct I/O is not enabled for a file system, data transferred between a user's address space and the disk is first buffered in the kernel address space. The default behavior is no forced direct I/O on a UFS file system. For more information, see mount_ufs(1M). Mounting and Unmounting File SystemsBefore you can access the files on a file system, you need to mount the file system. When you mount a file system, you attach that file system to a directory (mount point) and make it available to the system. The root (/) file system is always mounted. Any other file system can be connected or disconnected from the root (/) file system. When you mount a file system, any files or directories in the underlying mount point directory are unavailable as long as the file system is mounted. These files are not permanently affected by the mounting process, and they become available again when the file system is unmounted. However, mount directories are typically empty, because you usually do not want to obscure existing files. For example, the following figure shows a local file system, starting with a root (/) file system and the sbin, etc, and opt subdirectories. Figure 38-1 Sample root (/) File System ![]() To access a local file system from the /opt file system that contains a set of unbundled products, you must do the following:
For step-by-step instructions on how to mount file systems, see Chapter 40, Mounting and Unmounting File Systems (Tasks). Figure 38-2 Mounting a File System
| ||
| ||