VERITAS File System™ 3.5 (HP OnlineJFS/JFS 3.5) Administrator’s Guide HP-UX 11i v2 Second Edition Manufacturing Part Number : 5971-4772 August 2003 United States © Copyright 2003 Hewlett-Packard Development Company L.P. All rights reserved.
Legal Notices The information in this document is subject to change without notice. Hewlett-Packard makes no warranty of any kind with regard to this manual, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard shall not be held liable for errors contained herein or direct, indirect, special, incidental or consequential damages in connection with the furnishing, performance, or use of this material.
Publication History The manual publication date and part number indicate its current edition. The publication date will change when a new edition is released. The manual part number will change when extensive changes are made. To ensure that you receive the new editions, you should subscribe to the appropriate product support service. See your HP sales representative for details. • First Edition: December 2002, 5187-1879, HP-UX 11i (B.11.11) CD-ROM (Software Pack 11i December 2002) and Web (http://docs.hp.
Contents Preface 1. The VERITAS File System Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VxFS Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Disk Layouts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents logiosize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . nodatainlog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . blkclear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . mincache . . . . . . . . . . . . .
Contents Unbuffered I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Discovered Direct I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Synchronous I/O. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Other Advisories . . . . . . . . . . . . . . . . . . . . .
Contents Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Identifying File System Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 How to Identify a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Example. . . . . . . . . . . . . . . . . . . . . . .
Contents 9
Contents 10
Preface About This Document The VERITAS File System (OnlineJFS/JFS 3.5) Administrator’s Guide provides information on the most important aspects of VERITAS File System (VxFS) administration. NOTE The terms base VERITAS File System 3.5, HP JFS 3.5, and base VxFS are used interchangeably throughout this product note. In addition, the terms full VERITAS File System 3.5, HP OnlineJFS 3.5, and full VxFS are used interchangeably throughout this product note.
Typographical Conventions Table 1 Typeface Usage Examples Computer output, files, directories, software elements such as command options, function names, and parameters Read tunables from the /etc/vx/tunefstab file. monospace (bold) User input # mount -F vxfs /h/filesys italic New terms, book titles, emphasis, variables replaced with a name or value See the User’s Guide for details.
HP-UX Release Name and Release Identifier Each HP-UX 11i release has an associated release name and release identifier. The uname (1) command with the -r option returns the release identifier. This table shows the releases available for HP-UX 11i. Table 2 HP-UX 11i Releases Release Identifier Release Name Supported Processor Architecture B.11.11 HP-UX 11i v1 PA-RISC B.11.20 HP-UX 11i v1.5 Intel Itanium B.11.22 HP-UX 11i v1.6 Intel Itanium B.11.23 HP-UX 11i v2.
HP Encourages Your Comments HP encourages your comments concerning this document. We are truly committed to providing documentation that meets your needs. Please send comments to: netinfo_feedback@cup.hp.com Please include document title, manufacturing part number, and any comment, error found, or suggestion for improvement you have concerning this document. Also, please include what we did right so we can incorporate it into other documents.
1 The VERITAS File System Introduction VxFS is an extent based, intent logging file system. VxFS is designed for use in UNIX environments that require high performance and availability and deal with large volumes of data. This chapter provides an overview of major VxFS features that are described in detail in later chapters.
The VERITAS File System VxFS Features VxFS Features Basic features include: • Extent based allocations • Enhanced attributes • Fast file system recovery • Access control lists (ACLs) • Online administration • Online backup • Enhanced application interface • Enhanced mount options • Improved synchronous write performance • Support for file systems up to 4 terabytes in size • Support for files up to 2 terabytes in size • Enhanced I/O performance • Quotas • Improved database perform
The VERITAS File System Disk Layouts Disk Layouts The disk layout is the way file system information is stored on disk. On VxFS, five disk layout versions, numbered 1 through 5, were created to support various new features and specific UNIX environments. Currently, only Version 4 or Version 5 disk layouts can be created, but file systems with Version 2 and Version 3 disk layouts can be mounted. See “Disk Layout” on page 121 for a description of the disk layouts.
The VERITAS File System VERITAS Enterprise Administrator Graphical User Interface VERITAS Enterprise Administrator Graphical User Interface The VERITAS Enterprise AdministratorTM (VEA) is a Java-based GUI that consists of a server and a client. The server runs on a UNIX system that is running the VERITAS Volume Manager and VxFS. The client runs on any platform that supports the Java Runtime Environment. You can use VEA to perform a subset of VxFS administrative functions on a local or remote system.
The VERITAS File System Extent Based Allocation Extent Based Allocation Disk space is allocated in 1024-byte sectors to form logical blocks. VxFS supports logical block sizes of 1024, 2048, 4096, and 8192 bytes. The default block size depends on the size of the file system. For file systems up to 4 TB, the block size is 1K.
The VERITAS File System Extent Based Allocation Typed Extents In the Version 4 disk layout, VxFS introduced a new inode block map organization for indirect extents known as typed extents. Each entry in the block map has a typed descriptor record containing a type, offset, starting block, and number of blocks. Indirect and data extents use this format to identify logical file offsets and physical disk locations of any given extent.
The VERITAS File System Extent Attributes Extent Attributes VxFS allocates disk space to files in groups of one or more extents. VxFS also allows applications to control some aspects of the extent allocation. Extent attributes are the extent allocation policies associated with a file. The setext and getext commands allow the administrator to set or view extent attributes associated with a file, as well as to preallocate space for a file.
The VERITAS File System Online System Administration Online System Administration A VxFS file system can be defragmented and resized while it remains online and accessible to users. The following sections provide an overview of these features. Defragmentation Free resources are initially aligned and allocated to files in the most efficient order possible to provide optimal performance.
The VERITAS File System Application Interface Application Interface VxFS conforms to the System V Interface Definition (SVID) requirements and supports user access through the Network File System (NFS). Applications that require performance features not available with other file systems can take advantage of VxFS enhancements that are introduced in this section and covered in detail in “Application Interface” on page 55.
The VERITAS File System Extended mount Options Extended mount Options The VxFS file system supports extended mount options to specify: • Enhanced data integrity modes • Enhanced performance modes • Temporary file system modes • Improved synchronous writes • Large file sizes See “VxFS Performance: Creating, Mounting, and Tuning File Systems” on page 29 and the mount_vxfs (1M) manual page for details on the VxFS mount options.
The VERITAS File System Extended mount Options The mount -o log intent logging option guarantees that all structural changes to the file system are logged to disk before the system call returns to the application. If a system failure occurs, fsck replays any recent changes to preserve all metadata. Recent file data may be lost unless a request was made to sync it to disk. Enhanced Performance Mode VxFS has several mount options that improve performance such as delaylog and qlog.
The VERITAS File System Enhanced I/O Performance Enhanced I/O Performance VxFS provides enhanced I/O performance by applying an aggressive I/O clustering policy, integrating with VxVM, and allowing application specific parameters to be set on a per-file system basis. Enhanced I/O Clustering I/O clustering is a technique of grouping multiple I/O operations together for improved performance.
The VERITAS File System Access Control Lists Access Control Lists An Access Control List (ACL) stores a series of entries that identify specific users or groups and their access privileges for a directory or file. A file may have its own ACL or may share an ACL with other files. ACLs have the advantage of specifying detailed access permissions for multiple users and groups. Refer to the getacl (1) and setacl (1) manual pages for information on viewing and setting ACLs.
The VERITAS File System Quotas Installing VxFS and enabling the cluster feature does not create a cluster file system configuration. File system clustering requires other VERITAS products to enable communication services and provide storage resources. These products are packaged with VxFS in the SANPoint Foundation Suite HA to provide a complete clustering environment.
2 VxFS Performance: Creating, Mounting, and Tuning File Systems Introduction For any file system, the ability to provide peak performance is important. Adjusting the available VERITAS File System (VxFS) options provides a way to increase system performance. This chapter describes the commands and practices you can use to optimize VxFS. For information on optimizing an application for use with VxFS, see “Application Interface” on page 55.
VxFS Performance: Creating, Mounting, and Tuning File Systems Choosing mkfs Command Options Choosing mkfs Command Options There are several characteristics that you can select when you create a file system. The most important options pertaining to system performance are the block size and intent log size. Block Size The unit of allocation in VxFS is a block.
VxFS Performance: Creating, Mounting, and Tuning File Systems Choosing mount Command Options Choosing mount Command Options In addition to the standard mount mode (delaylog mode), VxFS provides blkclear, log, tmplog, and nodatainlog modes of operation. Caching behavior can be altered with the mincache option, and the behavior of O_SYNC and D_SYNC (see the fcntl (2) manual page) writes can be altered with the convosync option. The delaylog and tmplog modes can significantly improve performance.
VxFS Performance: Creating, Mounting, and Tuning File Systems Choosing mount Command Options nodatainlog Use the nodatainlog mode on systems with disks that do not support bad block revectoring. Usually, a VxFS file system uses the intent log for synchronous writes. The inode update and the data are both logged in the transaction, so a synchronous write only requires one disk write instead of two.
VxFS Performance: Creating, Mounting, and Tuning File Systems Choosing mount Command Options Because the mincache=direct, mincache=unbuffered, and mincache=dsync modes change non-synchronous I/O to synchronous I/O, there can be a substantial degradation in throughput for small to medium size files for most applications.
VxFS Performance: Creating, Mounting, and Tuning File Systems Choosing mount Command Options convosync NOTE Use of the convosync=dsync option violates POSIX guarantees for synchronous I/O. The convosync (convert osync) mode has five suboptions: • convosync=closesync • convosync=delay.
VxFS Performance: Creating, Mounting, and Tuning File Systems Choosing mount Command Options ioerror Sets the policy for handling I/O errors on a mounted file system. I/O errors can occur while reading or writing file data, or while reading or writing metadata. The file system can respond to these I/O errors either by halting or by gradually degrading. The ioerror option provides four policies that determine how the file system responds to the various errors.
VxFS Performance: Creating, Mounting, and Tuning File Systems Choosing mount Command Options tranflush Specifying the tranflush option is recommended when VxFS is used as the default boot file system (/stand). When tranflush is enabled, all metadata updates for that file system are both logged and flushed to disk. This greatly reduces the possibility of data and metadata inconsistency that can exist on a dirty file system before running a file system check (the fsck command).
VxFS Performance: Creating, Mounting, and Tuning File Systems Choosing mount Command Options Combining mount Command Options Although mount options can be combined arbitrarily, some combinations do not make sense. The following examples provide some common and reasonable mount option combinations. Example 1 - Desktop File System # mount -F vxfs -o log,mincache=closesync /dev/dsk/c1t3d0 /mnt This guarantees that when a file is closed, its data is synchronized to disk and cannot be lost.
VxFS Performance: Creating, Mounting, and Tuning File Systems Kernel Tunables Kernel Tunables This section describes the kernel tunable parameters in VxFS. All kernel tunables can be set or changed using the sam or kctune commands (see the sam(1M) and kctune(1M) manual pages). Internal Inode Table Size VxFS caches inodes in an inode table. The kernel tunable vx_ninode determines the number of entries in the inode table.
VxFS Performance: Creating, Mounting, and Tuning File Systems Kernel Tunables VxFS Inode Free Time Lag In VxFS, an inode is put on a freelist if it is not being used. The memory space for this unused inode can be freed it it stays on the freelist for a specified amount of time. The vxfs_ifree_timelag tunable specifies the minimum amount of time an unused inode spends on a freelist before its memory space is freed. vxfs_ifree_timelag is a dynamic tunable.
VxFS Performance: Creating, Mounting, and Tuning File Systems Monitoring Free Space VxVM Maximum I/O Size When using VxFS with the VERITAS Volume Manager (VxVM), VxVM by default breaks up I/O requests larger than 256K. When using striping, to optimize performance, the file system issues I/O requests that are up to a full stripe in size. If the stripe size is larger than 256K, those requests are broken up.
VxFS Performance: Creating, Mounting, and Tuning File Systems Monitoring Free Space The “before” result is the degree of fragmentation prior to the reorganization. If the degree of fragmentation is approaching the figures for bad fragmentation, reduce the interval between fsadm runs. If the degree of fragmentation is low, increase the interval between fsadm runs. The “after” result is an indication of how well the reorganizer has performed.
VxFS Performance: Creating, Mounting, and Tuning File Systems I/O Tuning I/O Tuning NOTE The tunables and the techniques described in this section work on a per file system basis. Use them judiciously based on the underlying device properties and characteristics of the applications that use the file system. Performance of a file system can be enhanced by a suitable choice of I/O sizes and proper alignment of the I/O requests based on the requirements of the underlying special device.
VxFS Performance: Creating, Mounting, and Tuning File Systems I/O Tuning Tunable VxFS I/O Parameters read_pref_io The preferred read request size. The file system uses this in conjunction with the read_nstream value to determine how much data to read ahead. The default value is 64K. write_pref_io The preferred write request size. The file system uses this in conjunction with the write_nstream value to determine how to do flush behind on writes. The default value is 64K.
VxFS Performance: Creating, Mounting, and Tuning File Systems I/O Tuning discovered_direct _iosz Any file I/O requests larger than the discovered_direct_iosz are handled as discovered direct I/O. A discovered direct I/O is unbuffered similar to direct I/O, but it does not require a synchronous commit of the inode when the file is extended or blocks are allocated.
VxFS Performance: Creating, Mounting, and Tuning File Systems I/O Tuning max_buf_data_size The maximum buffer size allocated for file data; either 8K bytes or 64K bytes. Use the larger value for workloads where large reads/writes are performed sequentially. Use the smaller value on workloads where the I/O is random or is done in small chunks. 8K bytes is the default value. max_direct_iosz The maximum size of a direct I/O request that will be issued by the file system.
VxFS Performance: Creating, Mounting, and Tuning File Systems I/O Tuning read_ahead The default for all VxFS read operations is to perform sequential read ahead. You can specify the read_ahead cache advisory to implement the VxFS enhanced read ahead functionality. This allows read aheads to detect more elaborate patterns (such as increasing or decreasing read offsets or multithreaded file accesses) in addition to simple sequential reads.
VxFS Performance: Creating, Mounting, and Tuning File Systems I/O Tuning write_throttle The write_throttle parameter is useful in special situations where a computer system has a combination of a large amount of memory and slow storage devices. In this configuration, sync operations (such as fsync()) may take long enough to complete that a system appears to hang.
VxFS Performance: Creating, Mounting, and Tuning File Systems I/O Tuning If an application is doing sequential I/O to large files, it should try to issue requests larger than the discovered_direct_iosz. This causes the I/O requests to be performed as discovered direct I/O requests, which are unbuffered like direct I/O but do not require synchronous inode updates when extending the file.
3 Extent Attributes Introduction The VERITAS File System (VxFS) allocates disk space to files in groups of one or more adjacent blocks called extents. VxFS defines an application interface that allows programs to control various aspects of the extent allocation for a given file (see “Extent Information” on page 58). The extent allocation policies associated with a file are referred to as extent attributes. The VxFS getext and setext commands let you view or manipulate file extent attributes.
Extent Attributes Attribute Specifics Attribute Specifics The two basic extent attributes associated with a file are its reservation and its fixed extent size. You can preallocate space to the file by manipulating a file’s reservation, or override the default allocation policy of the file system by setting a fixed extent size. Other policies determine the way these attributes are expressed during the allocation process.
Extent Attributes Attribute Specifics Reservation: Preallocating Space to a File VxFS makes it possible to preallocate space to a file at the time of the request rather than when data is written into the file. This space cannot be allocated to other files in the file system. VxFS prevents any unexpected out-of-space condition on the file system by ensuring that a file’s required space will be associated with the file before it is required. Persistent reservation is not released when a file is truncated.
Extent Attributes Attribute Specifics Other Controls The auxiliary controls on extent attributes determine: • Whether allocations are aligned • Whether allocations are contiguous • Whether the file can be written beyond its reservation • Whether an unused reservation is released when the file is closed • Whether the reservation is a persistent attribute of the file • When the space reserved for a file will actually become part of the file Alignment Specific alignment restrictions coordinate a f
Extent Attributes Commands Related to Extent Attributes Commands Related to Extent Attributes The VxFS commands for manipulating extent attributes are setext and getext; they allow the user to set up files with a given set of extent attributes or view any attributes that are already associated with a file. See the getext (1) and setext (1) manual pages for details on using these commands.
Extent Attributes Commands Related to Extent Attributes Failure to Preserve Extent Attributes Whenever a file is copied, moved, or archived using commands that preserve extent attributes, there is nevertheless the possibility of losing the attributes. Such a failure might occur for three reasons: • The file system receiving a copied, moved, or restored file from an archive is not a VxFS type.
4 Application Interface Introduction The VERITAS File System (VxFS) provides enhancements that can be used by applications that require certain performance features. This chapter describes cache advisories and provides information about fixed extent sizes and reservation of space for a file. If you are writing applications, you can optimize them for use with the VxFS. To optimize VxFS for use with applications, see Chapter 2, “VxFS Performance: Creating, Mounting, and Tuning File Systems,” on page 29.
Application Interface Cache Advisories Cache Advisories VxFS allows an application to set cache advisories for use when accessing files. These advisories are in memory only and they do not persist across reboots. Some advisories are currently maintained on a per-file, not a per-file-descriptor, basis. This means that only one set of advisories can be in effect for all accesses to the file. If two conflicting applications set different advisories, both use the last advisories that were set.
Application Interface Cache Advisories Discovered Direct I/O Discovered Direct I/O is a file system tunable you can set using the vxtunefs command. When the file system gets an I/O request larger than the discovered_direct_iosz, it tries to use direct I/O on the request. For large I/O sizes, Discovered Direct I/O can perform much better than buffered I/O.
Application Interface Extent Information Extent Information The VX_SETEXT ioctl command allows an application to reserve space for a file, and set fixed extent sizes and file allocation flags. Applications can obtain status information on VxFS ioctls by using the VX_GETEXT ioctl. The getext command also provides access to this information. See the getext (1), setext (1), and vxfsio (7) manual pages for more information.
Application Interface Extent Information NOTE Because VX_CONTIGUOUS is not a persistent flag, space will not be allocated contiguously after doing a file system restore. If the VX_NORESERVE flag is set, the reservation value in the inode is not changed. This flag is used by applications to do temporary reservation. Any space past the end of the file is given up when the file is closed.
Application Interface Extent Information Fixed Extent Sizes VxFS uses the I/O size of write requests, and a default policy, when allocating space to a file. For some applications, this may not work out well. These applications can set a fixed extent size, so that all new extents allocated to the file are of the fixed extent size. By using a fixed extent size, an application can reduce allocations and guarantee good extent sizes for a file.
Application Interface Freeze and Thaw Freeze and Thaw The VX_FREEZE ioctl command is used to freeze a file system. Freezing a file system temporarily blocks all I/O operations to a file system and then performs a sync on the file system. When the VX_FREEZE ioctl is issued, all access to the file system is blocked at the system call level. Current operations are completed and the file system is synchronized to disk. Freezing provides a stable, consistent file system.
Application Interface Freeze and Thaw 62 Chapter 4
5 Online Backup Introduction This chapter describes the online backup facility provided with the VERITAS File System (VxFS). The snapshot feature of VxFS can be used to create a snapshot image of a mounted file system, which becomes a duplicate read-only copy of the mounted file system. This chapter also provides a description of how to create a snapshot file system and some examples of backing up all or part of a file system using the snapshot mechanism.
Online Backup Snapshot File Systems Snapshot File Systems A snapshot file system is an exact image of a VxFS file system, referred to as the snapped file system, that provides a mechanism for making backups. The snapshot is a consistent view of the file system “snapped” at the point in time the snapshot is made. You can select files to back up from the snapshot (using a standard utility such as cpio or cp), or back up the entire file system image (using the vxdump or fscat utilities).
Online Backup Using a Snapshot File System for Backup Using a Snapshot File System for Backup After a snapshot file system is created, the snapshot performs a consistent backup of data in the snapped file system. Backup programs (such as cpio) that back up a standard file system tree can be used without modification on a snapshot file system because the snapshot presents the same data as the snapped file system.
Online Backup Creating a Snapshot File System Creating a Snapshot File System You create a snapshot file system by using the -o snapof= option of the mount command. The -o snapsize= option may also be required if the device you are mounting does not identify the device size in its disk label, or if you want a size smaller than the entire device.
Online Backup Making a Backup Making a Backup Here are some typical examples of making a backup of a 300,000 block file system named /home using a snapshot file system on /dev/vx/dsk/fsvol/vol1 with a snapshot mount point of /backup/home: • To back up files changed within the last week using cpio: # mount -F vxfs -o snapof=/home,snapsize=100000 \ /dev/vx/dsk/fsvol/vol1 /backup/home # cd /backup # find home -ctime -7 -depth -print | cpio -oc > /dev/rmt/0m # umount /backup/home • To do a full backup of /h
Online Backup Performance of Snapshot File Systems Performance of Snapshot File Systems Snapshot file systems maximize the performance of the snapshot at the expense of writes to the snapped file system. Reads from a snapshot file system typically perform at nearly the throughput rates of reads from a standard VxFS file system, allowing backups to proceed at the full speed of the standard file system. The performance of reads from the snapped file system are generally not affected.
Online Backup Snapshot File System Internals Snapshot File System Internals The following sections describe the internal structure of a snapshot file system and how it copies changed data blocks from the original snapped file system.
Online Backup Snapshot File System Internals How a Snapshot File System Works A snapshot file system is created by mounting an empty disk slice as a snapshot of a currently mounted file system. The bitmap, blockmap and super-block are initialized and then the currently mounted file system is frozen (see “Freeze and Thaw” on page 61, for a description of the VX_FREEZE ioctl). After the file system to be snapped is frozen, the snapshot is enabled and mounted and the snapped file system is thawed.
6 Quotas Introduction The VERITAS File System (VxFS) supports user quotas. The quota system limits the use of two principal resources of a file system: files and data blocks. For each of these resources, you can assign quotas to individual users to limit their usage.
Quotas Quota Limits Quota Limits You can set limits for individual users to file and data block usage on a file system. You can set two kinds of limits for each of the two resources: • The hard limit is an absolute limit that cannot be exceeded under any circumstances. • The soft limit, which must be lower than the hard limit, can be exceeded, but only for a limited time. The time limit can be configured on a per-file system basis only. The VxFS default limit is seven days.
Quotas Quota Commands Quota Commands Most of the quotas commands in VxFS are similar to BSD quotas commands. In general, quota administration for VxFS is performed using commands similar to HFS quota commands. The VxFS mount command supports a special mount option (–o quota), that can be used to turn on quotas at mount time. For additional information on the quota commands, see the corresponding manual pages. Using Quotas This section shows usage examples of the VxFS quota commands.
Quotas Using Quotas quota Use the quota command to view a user’s disk quotas and usage on VxFS file systems: # quota –v username This displays the user's quotas and disk usage on all mounted VxFS file systems where the quotas file exists. quot Use the quot command to display the number of blocks owned by each user in a file system.
A VERITAS File System Quick Reference Introduction This appendix provides instructions and examples on performing the following VERITAS File System (VxFS) operations: • Creating a File System • Mounting a File System • Unmounting a File System • Displaying Information on Mounted File Systems • Identifying File System Types • Resizing a File System • Backing Up and Restoring a File System • Using Quotas Appendix A 75
VERITAS File System Quick Reference Creating a File System Creating a File System The mkfs command creates a VxFS file system by writing to a special character device file. The special character device is a raw disk device or a VERITAS Volume Manager (VxVM) volume. mkfs builds a file system with a root directory and a lost+found directory. Before running mkfs, you must create the target device. Refer to your operating system documentation for more information.
VERITAS File System Quick Reference Mounting a File System Mounting a File System You can mount a VxFS file system by using the mount command. If you enter this command, the generic mount command parses the arguments and the -F fstype option executes the mount command specific to that file system type. For VxFS and VERITAS-installed products, the generic mount command executes the VxFS mount command from the directory /sbin/fs/vxfs3.5.
VERITAS File System Quick Reference Mounting a File System Mount Options The mount command has numerous options to tailor a file system for various functions and environments. Some specific_options are listed below. • Security feature If security is important, use blkclear to ensure that deleted files are completely erased before the space is reused. • Support for large files If you specify the largefiles option, you can create files larger than two gigabytes on the file system.
VERITAS File System Quick Reference Mounting a File System Here is a typical fstab file with the new file system on the last line: # System /etc/fstab file. Static # information about the file systems # See fstab(4) and sam(1M) for further # details on configuring devices.
VERITAS File System Quick Reference Unmounting a File System Unmounting a File System Use the umount command to unmount a currently mounted file system. How to Unmount a File System To unmount a file system, use the following syntax: umount special | mount_point Specify the file system to be unmounted as a mount_point or special (the device on which the file system resides). See the umount_vxfs (1M) manual page for more information about this command and its available options.
VERITAS File System Quick Reference Displaying Information on Mounted File Systems Displaying Information on Mounted File Systems You can use the mount command to display a list of currently mounted file systems. How to Display File System Information To view the status of mounted file systems, use the syntax: mount -v This shows the file system type and mount options for all mounted file systems. The -v option specifies verbose mode.
VERITAS File System Quick Reference Identifying File System Types Identifying File System Types Use the fstyp command to determine the file system type for a specified file system. This is useful when a file system was created elsewhere and you want to know its type. How to Identify a File System To determine the status of mounted file systems, use the syntax: fstyp -v special special The character (raw) device. -v Specifies verbose mode.
VERITAS File System Quick Reference Resizing a File System Resizing a File System You can extend or shrink mounted VxFS file systems using the fsadm command. Use the extendfs command to extend the size of an unmounted file system. A file system using the Version 4 disk layout can be up to two terabytes in size. A file system using the Version 5 disk layout can be up to 32 terabytes in size. The size to which a Version 5 disk layout file system can be increased depends on the file system block size.
VERITAS File System Quick Reference Resizing a File System How to Shrink a File System You can decrease the size of the file system using fsadm, even while the file system is mounted. NOTE In cases where data is allocated towards the end of the file system, shrinking may not be possible. If a file system is full, busy, or too fragmented, the resize operation may fail.
VERITAS File System Quick Reference Resizing a File System How to Reorganize a File System You can reorganize (or compact) a fragmented file system using fsadm, even while the file system is mounted. This may help shrink a file system that could not previously be decreased. NOTE If a file system is full or busy, the reorg operation may fail.
VERITAS File System Quick Reference Resizing a File System How to Extend a File System Using extendfs If a VxFS file system is not mounted, you can use the extendfs command to increase the size of the file system.
VERITAS File System Quick Reference Backing Up and Restoring a File System Backing Up and Restoring a File System To back up a VxFS file system, you first create a read-only snapshot file system, then back up the snapshot. This procedure lets you keep the main file system on line. The snapshot is a copy of the snapped file system that is frozen at the moment the snapshot is created.
VERITAS File System Quick Reference Backing Up and Restoring a File System How to Back Up a File System After creating a snapshot file system as described in the previous section, you can use vxdump to back it up. To back up a VxFS snapshot file system, use the syntax: vxdump [-c] [-f backupdev] snap_mount_point -c Specifies using a cartridge tape device. backupdev The device on which to back up the file system. snap_mount_point The snapshot file system’s mount point.
VERITAS File System Quick Reference Using Quotas Using Quotas You can use quotas to allocate per-user quotas on VxFS file systems. See “Quotas” on page 71 and the following manual pages for more information about the quota, quotaon, quotaoff, and edquota commands and their available options: • edquota (1M) • quota (1M) • quotaon (1M) • quotaoff (1M) How to Turn On Quotas You can enable quotas at mount time or after a file system is mounted.
VERITAS File System Quick Reference Using Quotas How to Set Up User Quotas You can set user quotas with the edquota command if you have superuser privileges. User quotas can have a soft limit and/or hard limit. You can modify the limits or assign them specific values. Users are allowed to exceed the soft limit, but only for a specified time. Disk usage can never exceed the hard limit. The default time limit for exceeding the soft limit is seven days on VxFS file systems.
B Kernel Messages Introduction This appendix contains a listing of diagnostic or error messages generated by the VERITAS File System (VxFS) kernel. Each message has a description and a suggestion on how to handle or correct the underlying problem.
Kernel Messages File System Response to Problems File System Response to Problems When the file system encounters problems, it responds in one of three ways: • Marks an inode bad • Disables transactions • Disables the file system Marking an Inode Bad Inodes can be marked bad if an inode update or a directory-block update fails. In these types of failures, the file system does not know what information is on the disk, and considers all the information that it finds to be invalid.
Kernel Messages Kernel Messages Kernel Messages This section lists the VxFS kernel error messages in numerical order. The Description subsection for each message describes the problem, the Action sub-section suggests possible solutions. Global Message IDs When a VxFS kernel message displays on the system console, it is preceded by a numerical ID shown in the msgcnt field.
Kernel Messages Kernel Messages Message Number 002 Message and Definition WARNING: msgcnt x: vxfs: mesg 002: vx_snap_strategy - mount_point file system write attempt to read-only file system WARNING: msgcnt x: vxfs: mesg 002: vx_snap_copyblk - mount_point file system write attempt to read-only file system • Description The kernel tried to write to a read-only file system. This is an unlikely problem, but if it occurs, the file system is disabled.
Kernel Messages Kernel Messages Message Number 006, 007 Message and Definition WARNING: msgcnt x: vxfs: mesg 006: vx_sumupd - mount_point file system summary update in au aun failed WARNING: msgcnt x: vxfs: mesg 007: vx_sumupd - mount_point file system summary update in inode au aun failed • Description An I/O error occurred while writing the allocation unit or inode allocation unit bitmap summary to disk. This sets the VX_FULLFSCK flag on the file system.
Kernel Messages Kernel Messages Message Number 011 Message and Definition NOTICE: msgcnt x: vxfs: mesg 011: vx_noinode - mount_point file system out of inodes • Description The file system is out of inodes. • Action Monitor the free inodes in the file system. If the file system is getting full, create more inodes either by removing files or by expanding the file system. File system resizing is described in “Online System Administration” on page 22, and in the fsadm_vxfs (1M) online manual page.
Kernel Messages Kernel Messages Message Number 014 Message and Definition WARNING: msgcnt x: vxfs: mesg 014: vx_iget - inode table overflow • Description All the system in-memory inodes are busy and an attempt was made to use a new inode. • Action Note: The tunable parameter vx_ninode is used to set the value of vxfs_ninode. Look at the processes that are running and determine which processes are using inodes. If it appears there are runaway processes, they might be tying up the inodes.
Kernel Messages Kernel Messages Message Number 017 Message and Definition WARNING: msgcnt x: vxfs: mesg 017: vx_attr_getblk - mount_point file system inode inumber marked bad in core WARNING: msgcnt x: vxfs: mesg 017: vx_attr_iget - mount_point file system inode inumber marked bad in core WARNING: msgcnt x: vxfs: mesg 017: vx_attr_indadd - mount_point file system inode inumber marked bad in core WARNING: msgcnt x: vxfs: mesg 017: vx_attr_indtrunc - mount_point file system inode inumber marked bad in core
Kernel Messages Kernel Messages Message Number 017 (continued) Message and Definition WARNING: msgcnt x: vxfs: mesg 017: vx_ilisterr - mount_point file system inode inumber marked bad in core WARNING: msgcnt x: vxfs: mesg 017: vx_indtrunc - mount_point file system inode inumber marked bad in core WARNING: msgcnt x: vxfs: mesg 017: vx_iread - mount_point file system inode inumber marked bad in core WARNING: msgcnt x: vxfs: mesg 017: vx_iremove - mount_point file system inode inumber marked bad in core WARN
Kernel Messages Kernel Messages Message Number 017 (continued) Message and Definition • Description When inode information is no longer dependable, the kernel marks it bad in memory. This is followed by a message to mark it bad on disk as well unless the mount command ioerror option is set to disable, or there is subsequent I/O failure when updating the inode on disk. No further operations can be performed on the inode. The most common reason for marking an inode bad is a disk I/O failure.
Kernel Messages Kernel Messages Message Number 019 Message and Definition WARNING: msgcnt x: vxfs: mesg 019: vx_log_add - mount_point file system log overflow • Description Log ID overflow. When the log ID reaches VX_MAXLOGID (approximately one billion by default), a flag is set so the file system resets the log ID at the next opportunity. If the log ID has not been reset, when the log ID reaches VX_DISLOGID (approximately VX_MAXLOGID plus 500 million by default), the file system is disabled.
Kernel Messages Kernel Messages Message Number 022 Message and Definition WARNING: msgcnt x: vxfs: mesg 022: vx_mountroot - root file system remount failed • Description The remount of the root file system failed. The system will not be usable if the root file system can’t be remounted for read/write access. When a VERITAS root file system is first mounted, it is mounted for read-only access. After fsck is run, the file system is remounted for read/write access.
Kernel Messages Kernel Messages Message Number 024 Message and Definition WARNING: msgcnt x: vxfs: mesg 024: vx_cutwait - mount_point file system current usage table update error • Description Update to the current usage table (CUT) failed. For a Version 2 disk layout, the CUT contains a fileset version number and total number of blocks used by each fileset. The VX_FULLFSCK flag is set in the super-block. If the super-block can’t be written, the file system is disabled.
Kernel Messages Kernel Messages Message Number 027 Message and Definition WARNING: msgcnt x: vxfs: mesg 027: vx_snap_bpcopy - mount_point snapshot file system write error • Description A write to the snapshot file system failed. As the primary file system is updated, copies of the original data are read from the primary file system and written to the snapshot file system. If one of these writes fails, the snapshot file system is disabled. • Action Check the console log for I/O errors.
Kernel Messages Kernel Messages Message Number 031 Message and Definition WARNING: msgcnt x: vxfs: mesg 031: vx_disable - mount_point file system disabled • Description File system disabled, preceded by a message that specifies the reason. This usually indicates a serious disk problem. • Action Unmount the file system and use fsck to run a full structural check. If the problem is a disk failure, replace the disk before the file system is mounted for write access.
Kernel Messages Kernel Messages Message Number 035 Message and Definition WARNING: msgcnt x: vxfs: mesg 035: vx_inactive - mount_point file system inactive of locked inode inumber • Description VOP_INACTIVE was called for an inode while the inode was being used. This should never happen, but if it does, the file system is disabled. • Action Unmount the file system and use fsck to run a full structural check. Report as a bug to your customer support organization.
Kernel Messages Kernel Messages Message Number 038 Message and Definition WARNING: msgcnt x: vxfs: mesg 038: vx_dataioerr - file system file data error • Description A read or a write error occurred while accessing file data. The message specifies whether the disk I/O that failed was a read or a write. File data includes data currently in files and free blocks. If the message is printed because of a read or write error to a file, another message that includes the inode number of the file will print.
Kernel Messages Kernel Messages Message Number 040 Message and Definition WARNING: msgcnt x: vxfs: mesg 040: vx_dqbad - mount_point file system user|group quota file update error for id id • Description An update to the user quotas file failed for the user ID. The quotas file keeps track of the total number of blocks and inodes used by each user, and also contains soft and hard limits for each user ID. The VX_FULLFSCK flag is set in the super-block.
Kernel Messages Kernel Messages Message Number 044 Message and Definition WARNING: msgcnt x: vxfs: mesg 044: vx_bsdquotaupdate - mount_point file system user|group id disk quota exceeded • Description The soft limit on blocks is exceeded. Users can exceed the soft limit for a limited amount of time before allocations begin to fail. After the soft quota time limit has expired, subsequent attempts to allocate blocks for files fail. • Action Remove some files to free up space.
Kernel Messages Kernel Messages Message Number 048, 049 Message and Definition WARNING: msgcnt x: vxfs: mesg 048: vx_dqread - warning: mount_point file system external user|group quota file read failed WARNING: msgcnt x: vxfs: mesg 049: vx_dqwrite - warning: mount_point file system external user|group quota file write failed • Description To maintain reliable usage counts, VxFS maintains the user quotas files as structural files in the structural fileset.
Kernel Messages Kernel Messages Message Number 057 Message and Definition WARNING: msgcnt x: vxfs: mesg 057: vx_esum_bad - mount_point file system extent allocation unit summary number number marked bad • Description An I/O error occurred reading or writing an extent allocation unit summary. The VX_FULLFSCK flag is set. If the VX_FULLFSCK flag can’t be set, the file system is disabled. • Action Check the console log for I/O errors. If the problem is a disk failure, replace the disk.
Kernel Messages Kernel Messages Message Number 060 Message and Definition WARNING: msgcnt x: vxfs: mesg 060: vx_snap_getbitbp - mount_point snapshot file system bitmap read error • Description An I/O error occurred while reading the snapshot file system bitmap. There is no problem with snapped file system, but the snapshot file system is disabled. • Action Check the console log for I/O errors. If the problem is a disk failure, replace the disk.
Kernel Messages Kernel Messages Message Number 064 Message and Definition WARNING: msgcnt x: vxfs: mesg 064: vx_ivalidate - mount_point file system inode number version number exceeds fileset's • Description During inode validation, a discrepancy was found between the inode version number and the fileset version number. The inode may be marked bad, or the fileset version number may be changed, depending on the ratio of the mismatched version numbers. VX_FULLFSCK flag is set.
Kernel Messages Kernel Messages Message Number 069 Message and Definition WARNING: msgcnt x: vxfs: mesg 069: memory usage specified by the vxfs:vxfs_ninode and vxfs:vx_bc_bufhwm parameters exceeds available memory; the system may hang under heavy load • Description The value of the system tunable parameters—vx_ninode and vx_bc_bufhwm—add up to a value that is more than 66% of the kernel virtual address space or more than 50% of the physical system memory.
Kernel Messages Kernel Messages Message Number 075 Message and Definition WARNING: msgcnt x: vxfs: mesg 075: replay fsck failed for mount_point file system • Description The log replay failed during a failover or while migrating the CFS primary-ship to one of the secondary cluster nodes. The file system was disabled. • Action Unmount the file system from the cluster. Use fsck to run a full structural check and mount the file system again.
Kernel Messages Kernel Messages Message Number 077 Message and Definition WARNING: msgcnt x: vxfs: mesg 077: vx_fshdchange - mount_point file system number fileset, fileset header: checksum failed • Description Disk corruption was detected while changing fileset headers. This can occur when writing a new inode allocation unit, preventing the allocation of new inodes in the fileset. • Action Unmount the file system and use fsck to run a full structural check.
Kernel Messages Kernel Messages Message Number 079 Message and Definition WARNING: msgcnt x: vxfs: mesg 017: vx_attr_getblk - mount_point file system inode inumber marked bad on disk WARNING: msgcnt x: vxfs: mesg 017: vx_attr_iget - mount_point file system inode inumber marked bad on disk WARNING: msgcnt x: vxfs: mesg 017: vx_attr_indadd - mount_point file system inode inumber marked bad on disk WARNING: msgcnt x: vxfs: mesg 017: vx_attr_indtrunc - mount_point file system inode inumber marked bad on disk
Kernel Messages Kernel Messages Message Number 079 (continued) Message and Definition WARNING: msgcnt x: vxfs: mesg 017: vx_ilisterr - mount_point file system inode inumber marked bad on disk WARNING: msgcnt x: vxfs: mesg 017: vx_indtrunc - mount_point file system inode inumber marked bad on disk WARNING: msgcnt x: vxfs: mesg 017: vx_iread - mount_point file system inode inumber marked bad on disk WARNING: msgcnt x: vxfs: mesg 017: vx_iremove - mount_point file system inode inumber marked bad on disk WARN
Kernel Messages Kernel Messages Message Number 079 (continued) Message and Definition • Description When inode information is no longer dependable, the kernel marks it bad on disk. The most common reason for marking an inode bad is a disk I/O failure. If there is an I/O failure in the inode list, on a directory block, or an indirect address extent, the integrity of the data in the inode, or the data the kernel tried to write to the inode list, is questionable.
Kernel Messages Kernel Messages Message Number 081 Message and Definition WARNING: msgcnt x: vxfs: mesg 081: possible network partition detected • Description This message displays when CFS detects a possible network partition and disables the file system locally, that is, on the node where the message appears. • Action There are one or more private network links for communication between the nodes in a cluster. At least one link must be active to maintain the integrity of the cluster.
C Disk Layout Introduction The disk layout is the way file system information is stored on disk. On VxFS, five different disk layout versions were created to take advantage of evolving technological developments. The disk layout versions used on VxFS were: Version 1 The Version 1 disk layout is the original VxFS disk layout provided with pre-2.0 versions of VxFS. Version 2 The Version 2 disk layout was designed to support features such as filesets, dynamic inode allocation, and enhanced security.
Disk Layout Disk Space Allocation Disk Space Allocation Disk space is allocated by the system in sectors. An integral number of sectors are grouped together to form a logical block. VxFS supports logical block sizes of 1024, 2048, 4096, and 8192 bytes. The default block size is 1024 bytes. The block size may be specified as an argument to the mkfs utility and may vary between VxFS file systems mounted on the same system. VxFS allocates disk space to files in extents.
Disk Layout The VxFS Version 4 Disk Layout inode list file Both the primary fileset and the structural fileset have their own set of inodes stored in an inode list file. Only the inodes in the primary fileset are visible to users. When the number of inodes is increased, the kernel increases the size of the inode list file. inode allocation unit file Holds the free inode map, extended operations map, and a summary of inode resources. log file Maps the block used by the file system intent log.
Disk Layout The VxFS Version 5 Disk Layout VxFS Version 4 Disk Layout Super-block Object Location Table OLT Extent Addresses Initial Inode Extents Fileset Header/ File Inode Number Fileset Header File Inode Initial Inode List Extent Addresses Inode List Inode Inode Allocation .... Unit Inode .... OLT Replica Primary Fileset Header Fileset Header File Inode List inum Structural Fileset Header Fileset Index and Name max_inodes Primary Fileset Header Features .... ....
Disk Layout The VxFS Version 5 Disk Layout terabytes in size. For 64-bit kernels, the maximum size of the file system you can create depends on the block size: Table C-1 Block Size Block Size and Maximum File System Size Maximum File System, Size 1024 bytes 4,294,967,039 sectors (≈ 4 TB) 2048 bytes 8,589,934,078 sectors (≈ 8 TB) 4096 bytes 17,179,868,15 6 sectors (≈ 16 TB) 8192 bytes 34,359,736,31 2 sectors (≈ 4 TB) NOTE Sector size in bytes specified by the DEV_BSIZE system parameter.
Disk Layout The VxFS Version 5 Disk Layout 126 Appendix C
Glossary C configuration The hardware you have connected to your computer, and the way you have instructed your computer to use the hardware. Hardware can include drives, boards, printers, displays, and so on. configuration file A configuration file. Every board or option you add to your computer needs a CFG (configuration) file.
Glossary configuration file 128 Glossary