UFS is the default disk-based file system in Solaris operating environment. Most of the time, when you administer a disk-based file system, you will be administering UFS file systems. UFS provides the following features:
State flags - Show the state of the file system: clean, stable, active, logging, or unknown. These flags eliminate unnecessary file system checks. If the file system is "clean," "stable," or "logging," file system checks are not run.
Extended fundamental types (EFT) - 32-bit user ID (UID), group ID (GID), and device numbers.
Large file systems - A UFS file system can be as large as 1 Tbyte (terabyte). The Solaris operating environment does not provide striping, which is required to make a logical slice large enough for a 1-Tbyte file system. However, the SolsticeTM DiskSuiteTM software, available from Sun, provides this capability.
Large files - By default, a UFS file system can have regular files larger than 2 Gbytes (gigabytes). You must explicitly use the nolargefiles mount option to enforce a 2 Gbyte maximum file size limit.
See Chapter 32, File System Reference for detailed information about the UFS file system.
When you create a UFS file system, the disk slice is divided into cylinder groups, which are made up of one or more consecutive disk cylinders. The cylinder groups are then further divided into addressable blocks to control and organize the structure of the files within the cylinder group. Each type of block has a specific function in the file system.
A UFS file system has these four types of blocks:
Boot block - Stores information used when booting the system
Superblock - Stores much of the information about the file system
Inode - Stores all information about a file except its name
Storage or data block - Stores data for each file
See "The Structure of UFS File System Cylinder Groups" for more detailed information about each type of block.
If you want to customize a file system using arguments with the newfs command or the mkfs command, see Chapter 32, File System Reference for information about altering these parameters.
UFS logging is the process of storing transactions (changes that make up a complete UFS operation) in a log before the transactions are applied to the UFS file system. Once a transaction is stored, the transaction can be applied to the file system later.
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 is true even when a system crashes, which normally interrupts system calls and introduces inconsistencies into a UFS file system.
UFS logging provides two advantages. It prevents file systems from becoming inconsistent, therefore eliminating the need to run fsck. And, because fsck can be bypassed, UFS logging reduces the time required to reboot a system if it crashes, or after an unclean halt (see "What fsck Checks and Tries to Repair" for details on unclean halts). UFS logging can especially reduce the boot time on systems that have large file systems, which usually take a long time to read and verify with fsck.
The log created by UFS logging is continually flushed as it fills up. The log is totally flushed when the file system is unmounted or as a result of the lockfs -f command.
UFS logging is not enabled by default. To enable UFS logging, you must specify the -o logging option with the mount command when mounting the file system. The log is allocated from free blocks on the file system, and it is sized approximately 1 Mbyte per 1 Gbyte of file system, up to a maximum of 64 Mbytes. Logging can be enabled on any UFS, including the root (/) file system. Also, the fsdb command has been updated with new debugging commands to support UFS logging.
When laying out file systems, you need to consider possible conflicting demands. Here are some suggestions:
Distribute the work load as evenly as possible among different I/O systems and disk drives. Distribute /export/home and swap space evenly across disks.
Keep pieces of projects or members of groups within the same file system.
Use as few file systems per disk as possible. On the system (or boot) disk, you should have three file systems: /, /usr, and swap space. On other disks, create one or, at most, two file systems. Fewer, roomier file systems cause less file fragmentation than many small, over-crowded file systems. Higher-capacity tape drives and the ability of ufsdump to handle multiple volumes make it easier to back up larger file systems.
If you have some users who consistently create very small files, consider creating a separate file system with more inodes. However, most sites do not need to be concerned about keeping similar types of user files in the same file system.
See Chapter 27, Creating File Systems (Tasks) for information on default file system parameters as well as procedures for creating new UFS file systems.