VERITAS File System 4.
Disclaimer The information contained in this publication is subject to change without notice. VERITAS Software Corporation 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. VERITAS Software Corporation shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this manual.
Contents 1. The VERITAS File System Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 VxFS Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Disk Layouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Quotas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cluster File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cross-Platform Data Sharing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . File Change Log . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents VxVM Maximum I/O Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Monitoring Free Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Monitoring Fragmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I/O Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Named Data Streams Programmatic Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Listing Named Data Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Namespace for Named Data Streams. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Behavior Changes in Other System Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents How a Snapshot File System Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 7. Quota ............................................................................. Quota Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Quota Files on VxFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Customizing QoSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Mapping Relocation Policies to Allocation Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Relocation List Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 11. Quick I/O for Databases Quick I/O Functionality and Performance. . . . . . . . . . . . . . .
Contents Mounting a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How to Mount a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mount Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How to Edit the fstab File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Disk Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Disk Space Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The VxFS Version 4 Disk Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The VxFS Version 5 Disk Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Preface The VERITAS File System Administrator’s Guide provides information on the most important aspects of VERITAS File System (VxFS) administration.
Typographic Conventions Table 1 describes the typographic conventions used in this document. Table 1 Typographic Conventions Typeface Usage Examples monospace Computer output, files, directories, software elements such as command options, function names, and parameters Read tunables from the /etc/vx/tunefstab file. italic New terms, book titles, emphasis, variables replaced with a name or value See the VERITAS 4.1 Installation Guide for details.
• VERITAS Volume Manager 4.1 Troubleshooting Guide • VERITAS Volume Manager 4.1 Migration Guide • VERITAS Volume Manager 4.1 Administrator’s Guide • VERITAS Enterprise Administrator (VEA 500 Series) Getting Started • VERITAS Storage Foundation 4.1 Cross-Platform Data Sharing Administrator’s Guide • VERITAS Flashsnap Point-In-Time-Copy Solutions Administrator Guide Technical Support For license information contact: • Software License Manager http://licensing.hp.com/welcome.
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 • Extent 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 32 terabytes in size • Support for files up to 2 terabytes in size • Enhanced I/O performance • Quotas • Cluster file systems • I
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 229 for a description of the disk layouts.
The VERITAS File System File System Performance Enhancements The rest of this chapter, as well as “VxFS Performance: Creating, Mounting, and Tuning File Systems” on page 25 and “Application Interface” on page 59 provide details on many of these features.
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 is IK. An extent is defined as one or more adjacent blocks of data within the file system. An extent is presented as an address-length pair, which identifies the starting block address and the length of the extent (in file system or logical blocks).
The VERITAS File System Extent Based Allocation Typed Extents VxFS has an 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 Fast File System Recovery With the Version 6 disk layout, you can dynamically increase or decrease the intent log size using the log option of the fsadm command. Increasing the size of the intent log can improve system performance because it reduces the number of times the log wraps around. However, increasing the intent log size can lead to greater times required for a log replay if there is a system failure.
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 59.
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 25 and the mount_vxfs (1M) manual page for details on the VxFS mount options.
The VERITAS File System Extended mount Options Using the log Option for Data Integrity File systems are typically asynchronous in that structural changes to the file system are not immediately written to disk, which provides better performance. However, recent changes made to a system can be lost if a system failure occurs. Specifically, attribute changes to files and recently created files may disappear.
The VERITAS File System Extended mount Options CAUTION The use of the convosync=dsyncoption violates POSIX semantics. Support for Large Files VxFS can support files up to two terabytes in size. See “largefiles | nolargefiles” on page 34 for information on how to create, mount, and manage file systems containing large files. CAUTION 14 Some applications and utilities may not work on large files.
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 Storage Checkpoints Storage Checkpoints To increase availability, recoverability, and performance, the VERITAS File System offers on-disk and online backup and restore capabilities that facilitate frequent and efficient backup strategies. Backup and restore applications can leverage the VERITAS Storage Checkpoint, a disk- and I/O-efficient copying technology for creating periodic frozen images of a file system.
The VERITAS File System Quotas Quotas VxFS supports quotas, which allocate per-user quotas and limit the use of two principal resources: files and data blocks. You can assign quotas for each of these resources. Each quota consists of two limits for each resource: • The hard limit represents an absolute limit on data blocks or files. A user can never exceed the hard limit under any circumstances. • The soft limit is lower than the hard limit and can be exceeded for a limited amount of time.
The VERITAS File System Cluster File Systems Cluster File Systems Clustered file systems are an extension of VxFS that support concurrent direct media access from multiple systems. CFS employs a master/slave protocol. All cluster file systems can read file data directly from a shared disk. In addition, all systems can write "in-place" file data. Operations that require changes to file system metadata, such as allocation, creation, and deletion, can only be performed by the single primary file system node.
The VERITAS File System Cross-Platform Data Sharing Cross-Platform Data Sharing Cross-platform data sharing allows data to be serially shared among heterogeneous systems where each system has direct access to the physical devices that hold the data.This feature can be used only in conjunction with VERITAS Volume Manager. See the VERITAS Storage Foundation Cross-Platform Data Sharing Administrator’s Guide for more information.
The VERITAS File System File Change Log File Change Log The VxFS File Change Log (FCL) tracks changes to files and directories in a file system.The File Change Log can be used by applications such as backup products, webcrawlers, search and indexing engines, and replication software that typically scan an entire file system searching for modifications since a previous scan. FCL functionality is a separately licensable feature. See “File Change Log” on page 21" for more information.
The VERITAS File System Multi-Volume Support Multi-Volume Support The multi-volume support (MVS) feature allows several volumes to be represented by a single logical object. All I/O to and from an underlying logical volume is directed by way of volume sets. This feature can be used only in conjunction with VERITAS Volume Manager. MVS functionality is a separately licensable feature. See Chapter 9, “Multi-Volume File Systems,” on page 123 for more information.
The VERITAS File System Quality of Storage Service Quality of Storage Service The Quality of Storage Service (QoSS) option is built on the multi-volume support technology introduced in this release. Using QoSS, you can map more than one volume to a single file system. You can then configure policies that automatically relocate files from one volume to another, or relocate files by running file relocation commands.
The VERITAS File System Quality of Storage Service 24 Chapter 1
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 59.
VxFS Performance: Creating, Mounting, and Tuning File Systems Introduction — Number of Links to a File — VxFS Inode Free Time Lag — VxVM Maximum I/O Size • Monitoring Free Space — Monitoring Fragmentation • I/O Tuning — Tuning VxFS I/O Parameters — Tunable VxFS I/O Parameters 26 Chapter 2
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 The rename(2) system call flushes the source file to disk to guarantee the persistence of the file data before renaming it. In both modes, the rename is also guaranteed to be persistent when the system call returns. This benefits shell scripts and programs that try to update a file atomically by writing the new file contents to a temporary file and then renaming it on top of the target file.
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 The mincache=direct, mincache=unbuffered, and mincache=dsync modes are used in environments where applications are experiencing reliability problems caused by the kernel buffering of I/O and delayed flushing of non-synchronous I/O.
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 CAUTION Chapter 2 Before using convosync=dsync, convosync=unbuffered, or convosync=direct, make sure that all applications that use the file system do not require synchronous inode time updates for O_SYNC writes.
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 Creating a File System with Large Files You can create a file system with large file capability by entering the following command: # mkfs -F vxfs -o largefiles special_device size Specifying largefiles sets the largefiles flag, which allows the file system to hold files up to two terabytes in size.
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. Internal Inode Table Size VxFS caches inodes in an inode table. There is a dynamic tunable in VxFS called vx_ninode that determines the number of entries in the inode table. A VxFS file system obtains the value of vx_ninode from the system configuration file used for making the HP-UX kernel (/stand/system for example).
VxFS Performance: Creating, Mounting, and Tuning File Systems Kernel Tunables Changing the value of a tunable does not resize the internal hash tables and structures of the caches. These sizes are determined at system boot up based on either the system memory size, which is the default, or the value of the tunable if explicitly set, whichever is larger.
VxFS Performance: Creating, Mounting, and Tuning File Systems Kernel Tunables The initial value of vx_bc_bufhwm is zero. When the operating system reboots, VxFS sets the value of vx_bc_bufhwm based on the amount of system memory. You can explicitly reset the value of vx_bc_bufhwm by changing the value of vxfs_bc_bufhwm using the sam or kctune commands (see the sam(1M) and kctune(1M) manual pages). You can also set the value by adding an entry to the system configuration file.
VxFS Performance: Creating, Mounting, and Tuning File Systems Kernel Tunables The default value of vxfs_ifree_timelag is 0. By setting vxfs_ifree_timelag to 0, the inode free timelag is autotuned to 1800 seconds. Specifying negative one (–1) stops the freeing of inode space; no further inode allocations are freed until the value is changed back to a value other than negative one.
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 A badly fragmented file system will have one or more of the following characteristics: • Greater than 5 percent of free space in extents of less than 8 blocks in length • More than 50 percent of free space in extents of less than 64 blocks in length • Less than 5 percent of the total file system size available as free extents in lengths of 64 or more blocks The optimal period for scheduling of extent reorganization run
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 /dev/vx/dsk/userdg/solbuild read_pref_io=64k,write_pref_io=64k,read_nstream=4,write_nstream=4 /dev/vx/dsk/userdg/solrelease read_pref_io=64k,write_pref_io=64k,read_nstream=4,write_nstream=4 /dev/vx/dsk/userdg/solpatch read_pref_io=128k,write_pref_io=128k,read_nstream=4,write_nstream=4 44 Chapter 2
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 default_indir_ size On VxFS, files can have up to ten direct extents of variable size stored in the inode. Once these extents are used up, the file must use indirect extents which are a fixed size that is set when the file first uses indirect extents. These indirect extents are 8K by default.
VxFS Performance: Creating, Mounting, and Tuning File Systems I/O Tuning fcl_maxalloc Specifies the maximum amount of space that can be allocated to the VxFS file change log (FCL). The FCL file is a sparse file that grows as changes occur in the file system. When the space allocated to the FCL file reaches the fcl_maxalloc value, the oldest FCL records are purged from the FCL and the extents nearest to the beginning of the FCL file are freed. This process is referred to as "punching a hole.
VxFS Performance: Creating, Mounting, and Tuning File Systems I/O Tuning hsm_write_ prealloc For a file managed by a hierarchical storage management (HSM) application, hsm_write_prealloc preallocates disk blocks before data is migrated back into the file system. An HSM application usually migrates the data back through a series of writes to the file, each of which allocates a few blocks.
VxFS Performance: Creating, Mounting, and Tuning File Systems I/O Tuning inode_aging_count Specifies the maximum number of inodes to place on an inode aging list. Inode aging is used in conjunction with file system Storage Checkpoints to allow quick restoration of large, recently deleted files. The aging list is maintained in first-in-first-out (fifo) order up to maximum number of inodes specified by inode_aging_count.
VxFS Performance: Creating, Mounting, and Tuning File Systems I/O Tuning max_seqio_extent_ size Increases or decreases the maximum size of an extent. When the file system is following its default allocation policy for sequential writes to a file, it allocates an initial extent which is large enough for the first write to the file.
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 For an application to do efficient disk I/O, it should issue read requests that are equal to the product of read_nstream multiplied by read_pref_io. Generally, any multiple or factor of read_nstream multiplied by read_pref_io should be a good size for performance. For writing, the same rule of thumb applies to the write_pref_io and write_nstream parameters.
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 64). The extent allocation policies associated with a file are referred to as extent attributes. The VxFS getext(1M) and setext(1M) 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 Reservation Persistence A reservation request can ensure that the reservation does not become a persistent attribute of the file. The unused reservation is discarded when the file is closed. Including Reservation in the File A reservation request can make sure the size of the file is adjusted to include the reservation. Normally, the space of the reservation is not included in the file until an extending write operation requires it.
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 25.
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 Unbuffered I/O If the VX_UNBUFFERED advisory is set, I/O behavior is the same as direct I/O with the VX_DIRECT advisory set, so the alignment constraints that apply to direct I/O also apply to unbuffered I/O. For unbuffered I/O, however, if the file is being extended, or storage is being allocated to the file, inode changes are not updated synchronously before the write returns to the user. The VX_UNBUFFERED advisory is maintained on a per-file-descriptor basis.
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 Cache Advisories sequential I/O, buffers are also freed when they are flushed to disk. The VX_NOREUSE advisory may slow down access to the file, but it can reduce the cached data held by the system. This can allow more data to be cached for other files and may speed up those accesses.
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 If the VX_TRIM flag is set, when the last close occurs on the inode, the reservation is trimmed to match the file size and the VX_TRIM flag is cleared. Any unused space is freed. This can be useful if an application needs enough space for a file, but it is not known how large the file will become. Enough space can be reserved to hold the largest expected file, and when the file has been written and closed, any extra space will be released.
Application Interface Extent Information With very large files, use of space reservation can avoid the need to use indirect extents. It can also improve performance and reduce fragmentation by guaranteeing that the file consists of large contiguous extents. Sometimes when critical file systems run out of space, cron jobs, mail, or printer requests fail. These failures are harder to track if the logs kept by the application cannot be written due to a lack of space on the file system.
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 Named Data Streams Named Data Streams Named data streams associate multiple data streams with a file. Access to the named data stream can be done through a file descriptor using the named data stream library functions. Applications can open the named data stream to obtain a file descriptor and perform read(), write(), and mmap() operations using the file descriptor. These system calls would work as though they are operating on a regular file.
Application Interface Named Data Streams Programmatic Interface Named Data Streams Programmatic Interface VxFS named data stream functionality is available only through the following application programming interface (API) functions: vxfs_nattr_link Links to a named data stream. vxfs_nattr_open Open a named data stream. vxfs_nattr_rename Renames a named data stream. vxfs_nattr_unlink Removes a named data stream.
Application Interface Named Data Streams Programmatic Interface write(afd, buf, 1024); /* writes to attribute file */ read(afd, buf, 1024); /* reads from attribute file */ dfd = vxfs_nattr_open(fd, ".", O_RDONLY);/* opens attribute directory for file foo */ getdents(dfd, buf, 1024); /* reads directory entries for attribute directory */ Namespace for Named Data Streams Names starting with $vxfs: are reserved for VxFS. Creating a data stream where the name starts with $vxfs: fail with an EINVAL error.
Application Interface Named Data Streams Programmatic Interface 72 Chapter 4
5 Storage Checkpoints Storage Checkpoints are a feature of the VERITAS File System (VxFS ) provide point-in-time images of file system contents. These frozen images of VxFS file systems can be used in a variety of applications such as full and incremental online backups, fast error recovery, and product development testing. Storage Checkpoint replicas of real time databases can also be used for decision support and an assortment of database analyses.
Storage Checkpoints What is Storage Checkpoint ? What is Storage Checkpoint ? VERITAS File System provides a unique Storage Checkpoint facility that quickly creates a persistent image of a file system at an exact point in time. Storage Checkpoints significantly reduce I/O overhead by identifying and maintaining only the file system blocks that have changed since the last Storage Checkpoint or backup through a copy-on-write technique (See “How a Storage Checkpoint Works” on page 76).
Storage Checkpoints What is Storage Checkpoint ? Chapter 5 75
Storage Checkpoints How a Storage Checkpoint Works How a Storage Checkpoint Works The Storage Checkpoint facility freezes the mounted file system (known as the primary fileset), initializes the Storage Checkpoint, and thaws the file system. Specifically, the file system is first brought to a stable state where all of its data is written to disk, and the freezing process momentarily blocks all I/O operations to the file system.
Storage Checkpoints How a Storage Checkpoint Works Figure 5-1 Primary Fileset and its Storage Checkpoint In the figure below, each block of the file system is represented by a square. Similar to the previous figure, this figure shows a Storage Checkpoint containing pointers to the primary fileset at the time the Storage Checkpoint is taken. Figure 5-2 Initializing a Storage Checkpoint The Storage Checkpoint presents the exact image of the file system by finding the data from the primary fileset.
Storage Checkpoints How a Storage Checkpoint Works the specified data block on the primary fileset do not result in additional updates to the Storage Checkpoint because the old data needs to be saved only once. As blocks in the primary fileset continue to change, the Storage Checkpoint accumulates the original data blocks. In the following figure, the third block originally containing C is updated. Before the block is updated with new data, the original data is copied to the Storage Checkpoint.
Storage Checkpoints Types of Storage Checkpoints Types of Storage Checkpoints You can create the following types of Storage Checkpoints: • Data Storage Checkpoints • Nodata Storage Checkpoints • Removable Storage Checkpoints • Non-mountable Storage Checkpoints Data Storage Checkpoints A data Storage Checkpoint is a complete image of the file system at the time the Storage Checkpoint is created. This type of Storage Checkpoint contains the file system metadata and file data blocks.
Storage Checkpoints Types of Storage Checkpoints Non-mountable Storage Checkpoints A non-mountable Storage Checkpoint cannot be mounted. You can use this type of Storage Checkpoint as a security feature which prevents other applications from accessing the Storage Checkpoint and modifying it.
Storage Checkpoints Storage Checkpoint Administration Storage Checkpoint Administration Storage Checkpoint administrative operations require the utility (see the fsckptadm(1M) manual page). You can use the fsckptadm utility to create and remove Storage Checkpoints, change attributes, and ascertain statistical data. Every Storage Checkpoint has an associated name, which allows you to manage Storage Checkpoints; this name is limited to 127 characters and cannot contain a colon (:).
Storage Checkpoints Storage Checkpoint Administration devid size used avail name 0 20971520 8497658 12473862 mnt1 1 20971520 6328993 14642527 mnt2 2 20971520 4458462 16513058 mnt3 Creating a Storage Checkpoint You can create a Storage Checkpoint using the fsckptadm utility. In these examples, /mnt0 is a mounted VxFS file system with a Version 4 or Version 5 disk layout.
Storage Checkpoints Storage Checkpoint Administration Removing a Storage Checkpoint You can delete a Storage Checkpoint by specifying the remove keyword of the fsckptadm command. Specifically, you can use either the synchronous or asynchronous method of removing a Storage Checkpoint; the asynchronous method is the default method. The synchronous method entirely removes the Storage Checkpoint and returns all of the blocks to the file system before completing the fsckptadm operation.
Storage Checkpoints Storage Checkpoint Administration WARNING If you create a Storage Checkpoint for backup purposes, do not mount it as a writable Storage Checkpoint. You will lose the point-in-time image if you accidently write to the Storage Checkpoint. A Storage Checkpoint is mounted on a special pseudo device. This pseudo device does not exist in the system name space; the device is internally created by the system and used while the Storage Checkpoint is mounted.
Storage Checkpoints Storage Checkpoint Administration /dev/vx/dsk/fsvol/vol1:may_23 /fsvol_may_23 You can only mount a Storage Checkpoint clusterwide if the file system that the Storage Checkpoint belongs to is also mounted clusterwide. Similarly, you can only mount a Storage Checkpoint locally if the file system that the Storage Checkpoint belongs to is mounted locally. You can unmount Storage Checkpoints using the umount command (see the umount_vxfs(1M) manual page).
Storage Checkpoints Storage Checkpoint Administration NOTE You cannot convert a nodata Storage Checkpoint to a data Storage Checkpoint because a nodata Storage Checkpoint only keeps track of the location of block changes and does not save the content of file data blocks Difference Between a Data and a Nodata Storage Checkpoint The following example shows the difference between data Storage Checkpoints and nodata Storage Checkpoints: 1.
Storage Checkpoints Storage Checkpoint Administration # cat /mnt0/file goodbye # cat /mnt0@5_30pm/file hello, world 6. Unmount the Storage Checkpoint, convert the Storage Checkpoint to a nodata Storage Checkpoint, and mount the Storage Checkpoint again. # umount /mnt0@5_30pm # fsckptadm -s set nodata ckpt@5_30pm /mnt0 # mount -F vxfs -o ckpt=ckpt@5_30pm \ /dev/vx/dsk/dg1/test0:ckpt@5_30pm /mnt0@5_30pm 7. Examine the content of both files.
Storage Checkpoints Storage Checkpoint Administration 2.
Storage Checkpoints Storage Checkpoint Administration # fsckptadm set nodata latest /mnt0 # fsckptadm list /mnt0 /mnt0 latest: ctime = Mon 26 Jul 11:56:55 2004 mtime = Mon 26 Jul 11:56:55 2004 flags = nodata, largefiles, delayed old: ctime = Mon 26 Jul 11:56:51 2004 mtime = Mon 26 Jul 11:56:51 2004 flags = largefiles older: ctime = Mon 26 Jul 11:56:46 2004 mtime = Mon 26 Jul 11:56:46 2004 flags = largefiles oldest: ctime = Mon 26 Jul 11:56:41 2004 mtime = Mon 26 Jul 11:56:41 2004 flags
Storage Checkpoints Storage Checkpoint Administration ctime = Mon 26 Jul 11:56:46 2004 mtime = Mon 26 Jul 11:56:46 2004 flags = largefiles oldest: ctime = Mon 26 Jul 11:56:41 2004 mtime = Mon 26 Jul 11:56:41 2004 flags = largefiles Then recreate it as a nodata Storage Checkpoint: # fsckptadm -n create latest /mnt0 # fsckptadm list /mnt0 /mnt0 latest: ctime = Mon 26 Jul 12:06:42 2004 mtime = Mon 26 Jul 12:06:42 2004 flags = nodata, largefiles, delayed old: ctime = Mon 26 Jul 11:56:51 2004
Storage Checkpoints Storage Checkpoint Administration # fsckptadm list /mnt0 /mnt0 latest: ctime = Mon 26 Jul 12:06:42 2004 mtime = Mon 26 Jul 12:06:42 2004 flags = nodata, largefiles, delayed old: ctime = Mon 26 Jul 11:56:51 2004 mtime = Mon 26 Jul 11:56:51 2004 flags = largefiles older: ctime = Mon 26 Jul 11:56:46 2004 mtime = Mon 26 Jul 11:56:46 2004 flags = largefiles oldest: ctime = Mon 26 Jul 11:56:41 2004 mtime = Mon 26 Jul 11:56:41 2004 flags = nodata, largefiles 7.
Storage Checkpoints Storage Checkpoint Administration 92 mtime = Mon 26 Jul 11:56:41 2004 flags = nodata, largefiles Chapter 5
Storage Checkpoints Space Management Considerations Space Management Considerations Several operations, such as removing or overwriting a file, can fail when a file system containing Storage Checkpoints runs out of space. Usually these operations do not fail because of insufficient space on the file system, but these operations on a file system containing Storage Checkpoints can cause a data block copy that, in turn, may require extent allocation.
Storage Checkpoints File System Restore From Storage Checkpoints File System Restore From Storage Checkpoints Mountable data Storage Checkpoints on a consistent and undamaged file system can be used by backup and restore applications to restore either individual files or an entire file system. Restoration from Storage Checkpoints can also help recover incorrectly modified files, but typically cannot recover from hardware damage or other file system integrity problems.
Storage Checkpoints File System Restore From Storage Checkpoints 4. Go to the /home/checkpoints/mar_4/users/me directory, which contains the image of your home directory. $ cd /home/checkpoints/mar_4/users/me $ ls -l -rw-r--r-- 1 me staff 14910 Mar 4 17:09 MyFile.txt 5. Copy the file MyFile.txt to your home directory. $ cp MyFile.txt /home/users/me $ cd /home/users/me $ ls -l -rw-r--r-- 1 me staff 14910 Mar 4 18:21 MyFile.
Storage Checkpoints File System Restore From Storage Checkpoints flags = largefiles, file system root CKPT6: ctime = Thu 08 May 2004 06:28:35 PM PST mtime = Thu 08 May 2004 06:28:35 PM PST flags = largefiles CKPT5: ctime = Thu 08 May 2004 06:28:34 PM PST mtime = Thu 08 May 2004 06:28:34 PM PST flags = largefiles, nomount CKPT4: ctime = Thu 08 May 2004 06:28:33 PM PST mtime = Thu 08 May 2004 06:28:33 PM PST flags = largefiles CKPT3: ctime = Thu 08 May 2004 06:28:36 PM PST mtime = Thu 0
Storage Checkpoints File System Restore From Storage Checkpoints ctime = Thu 08 May 2004 06:28:31 PM PST mtime = Thu 08 May 2004 06:28:36 PM PST flags = largefiles UX:vxfs fsckpt_restore: WARNING: V-3-24640: Any file system changes or Storage Checkpoints made after Thu 08 May 2004 06:28:31 PM PST will be lost. 3.
Storage Checkpoints File System Restore From Storage Checkpoints ctime = Thu 08 May 2004 06:28:30 PM PST mtime = Thu 08 May 2004 06:28:30 PM PST flags = largefiles CKPT1: ctime = Thu 08 May 2004 06:28:29 PM PST mtime = Thu 08 May 2004 06:28:29 PM PST flags = nodata, largefiles Select Storage Checkpoint for restore operation or (EOF) to exit or to list Storage Checkpoints: 98 Chapter 5
Storage Checkpoints Storage Checkpoint Quotas Storage Checkpoint Quotas VxFS provides options to the fsckptadm command interface to administer Storage Checkpoint quotas. Storage Checkpoint quotas set limits on the number of blocks used by a primary fileset and all of its related Storage Checkpoints. hard limit An absolute limit that cannot be exceeded. If a hard limit is exceeded, all further allocations on any of the Storage Checkpoints fail, but existing Storage Checkpoints are preserved.
Storage Checkpoints Storage Checkpoint Quotas 100 Chapter 5
6 Online Backup Using File System Snapshots 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 Using File System Snapshots 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.
Online Backup Using File System Snapshots 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 Using File System Snapshots 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 Using File System Snapshots 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
Online Backup Using File System Snapshots 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. The performance of reads from the snapped file system are generally not affected.
Online Backup Using File System Snapshots Differences Between Snapshots and Storage Checkpoints Differences Between Snapshots and Storage Checkpoints While snapshots and Storage Checkpoints both create a point-in-time image of a file system and only the changed data blocks are updated, there are significant differences between the two technologies: • Snapshots require a separate device for storage. Storage Checkpoints reside on the same device as the original file system. • Snapshots are read-only.
Online Backup Using File System Snapshots 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 Using File System Snapshots Snapshot File System Internals The blockmap contains one entry for each block on the snapped file system. Initially, all entries are zero. When a block is copied from the snapped file system to the snapshot, the appropriate entry in the blockmap is changed to contain the block number on the snapshot file system that holds the data from the snapped file system.
Online Backup Using File System Snapshots Snapshot File System Internals CAUTION 110 If a snapshot file system runs out of space for changed data blocks, it is disabled and all further access to it fails. This does not affect the snapped file system.
7 Quota 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. The following topics are covered in this chapter: • Quota Limits • Quota Files on VxFS • Quota Commands • Using Quotas For more information on VxFS quotas, see .
Quota 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.
Quota 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. NOTE For additional information on the quota commands, see the corresponding manual pages.
Quota Using Quotas edquota You can set up user quotas using the edquota command. You must have superuser privileges to edit quotas: # edquota username edquota creates a temporary file for the given user; this file contains on–disk quotas for each mounted file system that has a quotas file. It is not necessary that quotas be turned on for edquota to work. However, the quota limits are applicable only after quotas are turned on for a given file system.
8 File Change Log CAUTION File Change Log is currently not officially supported, and VERITAS strongly cautions against using it in a production environment. Although FCL is not 100% complete, it is functional and can be used to begin developing new applications. File Change Log will be fully operational in the next VERITAS File System maintenance release. The VxFS File Change Log (FCL) tracks changes to files and directories in a file system.
File Change Log The File Change Log File The File Change Log File FCL stores changes in a sparse file in the file system namespace. The FCL log file is always located in mount_point/lost+found/changelog. The FCL file behaves like a regular file, but some operations are prohibited.The standard system calls open(2), lseek(2), read(2) and close(2) can access the data in the FCL. The system calls write(2), mmap(2) and rename(2) are not allowed.
File Change Log File Change Log Administrative Interface File Change Log Administrative Interface The FCL can be set up and tuned through the VxFS administrative commands fcladm and vxtunefs. The FCL tunable parameters are: fcl_keeptime Specifies the duration in seconds that FCL records stay in the FCL file before they can be purged. The first records to be purged are the oldest ones, which are located at the beginning of the file.
File Change Log File Change Log Administrative Interface To print the contents of the FCL in text format (the offset used must be 32-byte aligned), enter: # fcladm print offset mount_point 118 Chapter 8
File Change Log File Change Log Programmatic Interface File Change Log Programmatic Interface The standard system calls open(2), lseek(2), read(2) and close(2) can be used on the FCL file at mount_point/lost+found/changelog. Only one programmatic interface is exposed through libvxfsutil, the vxfsu_fcl_sync API (see the vxfsu_fcl_sync(3) manual page). The prototype is available at /opt/VRTSfssdk/4.0/include/vxfsutil.h.
File Change Log File Change Log Programmatic Interface return ENOENT; } if ((off = lseek(fd, 0, SEEK_SET)) != 0) { close(fd); return EIO; } size = read(fd, &fclsb, sizeof (struct fcl_sb)); if (size < 0) { close(fd); return EIO; } if (fclsb.fc_state == VX_FCLS_OFF) { close(fd); return 0; } if (err = vxfsu_fcl_sync(fclname, &lastoff)) { close(fd); return err; } if ((off = lseek(fd, fclsb.fc_foff)) != fclsb.
File Change Log File Change Log Programmatic Interface return 0; } Chapter 8 121
File Change Log Reverse Path Name Lookup Reverse Path Name Lookup The reverse path name lookup feature obtains the full path name of a file or directory from the inode number of that file or directory. The inode number is provided as an argument to the vxlsino administrative command, or the vxfs_inotopath application programming interface library function.
9 Multi-Volume File Systems VxFS provides support for multi-volume file systems when used in conjunction with the VERITAS Volume Manager.Using the multi-volume support (MVS) feature, you can create a single file system over multiple volumes and set the properties for each volume. For example, it is possible to place metadata on mirrored storage while placing file data on better performing volume types such as RAID5.
Multi-Volume File Systems Features Implemented Using MVS Features Implemented Using MVS You can implement the following features using multi-volume support: • Controlling where files are stored can be selected at multiple levels so that specific files or file hierarchies can be assigned to different volumes. This functionality is available in the VERITAS File System Quality of Storage Service (QoSS) feature (see Chapter 10, “Quality of Storage Service,” on page 135).
Multi-Volume File Systems Volume Sets Volume Sets The VERITAS Volume Manager exports a feature called Volume Sets to VxFS. Unlike a Volume Manager volume, which is used for accessing raw I/O or contain a file system, a volume set is a container for multiple different volumes. Each volume in a volume set has its own internal structure. The Volume Manager vxvset is used to create and manage volume sets.
Multi-Volume File Systems Volume Sets /dev/vx/rdsk/rootdg/vol4: No such file or directory Volume sets cannot be empty. So, a volume set is removed when the last entry in that set is removed.
Multi-Volume File Systems Creating MVS File Systems Creating MVS File Systems After a volume set is created, creating a VxFS file system is the same as creating a file system on a raw device or volume.
Multi-Volume File Systems Creating MVS File Systems 3 51200 16 51184 vol4 4 51200 16 51184 vol5 You must empty a volume before you remove it from the file system. All the file system commands except volume addition and deletion work alike on volumes within a volume set.
Multi-Volume File Systems Allocation Policies Allocation Policies To make full use of the MVS features, VxFS supports allocation policies that allow assigning files or groups of files to specified volumes within the volume set. A policy specifies a list of volumes and the order of allocations. You can assign a policy to a file, to a file system, or to a Storage Checkpoint created from a file system.
Multi-Volume File Systems Allocation Policies The assignment of policies on a file system-wide basis ensures that any metadata allocated is stored on the device with the policy metadatapolicy (vol2) and all the user data is stored on vol1 with the associated datapolicy policy.
Multi-Volume File Systems Volume Encapsulation Volume Encapsulation Multi-volume support enables the ability to encapsulate an existing raw volume and make the volume contents appear as a file in the file system. There are two steps required to achieve this: • Add the volume to an existing volume set. • Add the volume to the file system using fsvoladm. As an example: Assume that the following volume set and new volume exist.
Multi-Volume File Systems Volume Encapsulation # head -2 /mnt1/dbfile root:x:0:1:Super-User:/:/sbin/sh daemon:x:1:1::/: Now, you can view the passwd file that was written to the raw volume . NOTE 132 If the encapsulated file is changed in any way, for example, extended, truncated, or moved with an allocation policy or resized volume, or the volume is encapsulated with a bias, the file cannot be de-encapsulated.
Multi-Volume File Systems Converting from QuickLog to MVS Converting from QuickLog to MVS The 4.0 release of the VERITAS File System is the last to support Quicklog. The Version 6 disk layout does not support QuickLog. The functionality provided by the VERITAS Multi-Volume Support feature replaces most of the functionality provided by QuickLog. The following procedure describes how to migrate from QuickLog to MVS.
Multi-Volume File Systems Converting from QuickLog to MVS 134 Chapter 9
10 Quality of Storage Service The VERITAS File System allows you to create a file system that spans multiple volumes ,known as a multi-volume file system. The component volumes compose a volume set. See “Quality of Storage Service” on page 135. On top of this basic capability is a set of services known as Quality of Storage Service (QoSS).
Quality of Storage Service How File Relocation Works How File Relocation Works File relocation is the process of searching a file system to select files listed in a relocation policy for relocation, then relocating the selected files. The volume on which files are originally located is referred to as a source component volume, and the volume to which files are relocated is referred to as a destination component volume.
Quality of Storage Service Configuring Relocation Policies Configuring Relocation Policies Relocation policies define the files to relocate and the physical devices on which the files are located. Relocation policies are based on the following properties of a file: • Age: The time since the file was last accessed or last modified. • File size • Path: The location of a file in a directory structure.
Quality of Storage Service Configuring Relocation Policies -p policy Evaluates files based on the specified policy only. If not specified, fssweep evaluates files based on all configured policies. -r Reports a statistical summary of files that can be relocated to standard output without actually relocating any files. The report is the same as the fsmove statistical summary. -s size Sets a limit for the cumulative size of all files in kilobytes for the fsmove utility to relocate.
Quality of Storage Service Configuring Relocation Policies size_of_all_files_relocated The cumulative size of all files relocated. Scheduling Example You can use crontab for schedule file selection and relocation at specified intervals. To schedule automatic relocations, run crontab to include an example such as the following in a crontab file. The example crontab file entry selects files eligible for relocation and moves them to destination component volumes.
Quality of Storage Service Customizing QoSS Customizing QoSS The following information is not essential to QoSS daily operation and management. This section describes the relationship between the fssweep/fsmove utilities and the allocation policies and how files and volumes are selected for relocation. Mapping Relocation Policies to Allocation Policies The fssweep and fsmove utilities use relocation policies to relocate existing files.
Quality of Storage Service Customizing QoSS You can use the fsapadm utility to create a special allocation policy named fsmove_SITE. The fssweep and fsmove utilities never create an allocation policy named fsmove_SITE. If this allocation policy exists and was established as the file system’s default allocation policy, fssweep considers any file in this allocation policy as residing in any of the volumes that belong to the policy.
Quality of Storage Service Customizing QoSS 142 Chapter 10
11 Quick I/O for Databases VERITAS Quick I/O for Databases (referred to as Quick I/O) allows applications access preallocated VxFS files as raw character devices. This provides the administrative benefits of running databases on file systems without the performance degradation usually associated with databases created on file systems.
Quick I/O for Databases Quick I/O is part of the VRTSvxfs package, but is available for use only with other VERITAS products. See the VERITAS File System Release Notes for current product information.
Quick I/O for Databases Quick I/O Functionality and Performance Quick I/O Functionality and Performance Many database administrators (DBAs) create databases on file systems because it makes common administrative tasks (such as moving, copying, and backup) much simpler. However, putting databases on file systems significantly reduces database performance. By using VERITAS Quick I/O, you can retain the advantages of having databases on file systems without performance degradation.
Quick I/O for Databases Quick I/O Functionality and Performance Avoiding Kernel Write Locks When database I/O is performed via the write() system call, each system call acquires and releases a write lock inside the kernel. This lock prevents simultaneous write operations on the same file. Because database systems usually implement their own locks for managing concurrent access to files, write locks unnecessarily serialize I/O operations.
Quick I/O for Databases Using VxFS Files as Raw Character Devices Using VxFS Files as Raw Character Devices When VxFS with Quick I/O is installed, there are two ways of accessing a file: • The VxFS interface treats the file as a regular VxFS file • The Quick I/O interface treats the same file as if it were a raw character device, having performance similar to a raw device This allows a database server to use the Quick I/O interface while a backup server uses the VxFS interface.
Quick I/O for Databases Quick I/O Naming Convention Quick I/O Naming Convention To treat a file as a raw character device, Quick I/O requires a file name extension to create an alias for a regular VxFS file. Quick I/O recognizes the alias when you add the following suffix to a file name: ::cdev:vxfs: Whenever an application opens an existing VxFS file with the suffix ::cdev:vxfs (the cdev portion is an acronym for character device), Quick I/O treats the file as if it were a raw device.
Quick I/O for Databases Use Restrictions Use Restrictions • — The name xxx::cdev:vxfs: is recognized as a special name by VxFS only when: VxFS with Quick I/O has a valid license — the regular file xxx is physically present on the VxFS file system — there is no regular file named xxx::cdev:vxfs: on the system • If the file xxx is being used for memory mapped I/O, it cannot be accessed as a Quick I/O file.
Quick I/O for Databases Creating a Quick I/O File Using qiomkfile Creating a Quick I/O File Using qiomkfile The best way to make regular files accessible to the Quick I/O interface and preallocate space for them is to use the qiomkfile command. Unlike the VxFS setext command, which requires superuser privileges, any user who has read/write permissions can run qiomkfile to create the files. The qiomkfile command has five options: -a Creates a symbolic link with an absolute path name for a specified file.
Quick I/O for Databases Creating a Quick I/O File Using qiomkfile $ ls -lL crw-r----- 1oracle dba 43,0 Oct 22 15:04 dbfile -rw-r--r-- 1oracle dba 10485760 Oct 22 15:04 .dbfile If you specify the -a option to qiomkfile, an absolute path name (See “Using Absolute or Relative Path Names” on page 152) is used so /database/dbfile points to /database/.dbfile::cdev:vxfs:. To check the results, enter: $ ls -al -rw-r--r-- 1 oracle dba 104857600 Oct 22 15:05 .
Quick I/O for Databases Accessing Regular VxFS Files Through Symbolic Links Accessing Regular VxFS Files Through Symbolic Links Another way to use Quick I/O is to create a symbolic link for each file in your database and use the symbolic link to access the regular files as Quick I/O files. The following commands create a 100 MB Quick I/O file named dbfile on the VxFS file system /database. The dd command preallocates the file space: $ cd /database $ dd if=/dev/zero of=/database/.
Quick I/O for Databases Accessing Regular VxFS Files Through Symbolic Links # touch .dbfile # setext -r 102400 -f noreserve -f chgsize .dbfile # ln -s .dbfile::cdev:vxfs: dbfile # chown oracle dbfile # chgrp dba dbfile See the setext(1M) manual page for more information.
Quick I/O for Databases Using Quick I/O with Oracle Databases Using Quick I/O with Oracle Databases The following example shows how a file can be used by an Oracle database to create a tablespace.
Quick I/O for Databases Using Quick I/O with Sybase Databases Using Quick I/O with Sybase Databases Quick I/O works similarly on Sybase database devices. To create a new database device, preallocate space on the file system by using the qiomkfile command, then use the Sybase buildmaster command for a master device, or the Transact SQL disk init command for a database device.
Quick I/O for Databases Enabling and Disabling Quick I/O Enabling and Disabling Quick I/O If the Quick I/O feature is licensed and installed, Quick I/O is enabled by default when a file system is mounted. Alternatively, the VxFS mount -o qio command enables Quick I/O. The mount -o noqio command disables Quick I/O. If Quick I/O is not installed or licensed, a file system mounts by default without Quick I/O and no error message is displayed.
Quick I/O for Databases Cached Quick I/O For Databases Cached Quick I/O For Databases 32-bit applications (such as 32-bit databases) can use a maximum of only 4 GB of memory because of the 32-bit address limitation. The Cached Quick I/O feature improves database performance on machines with sufficient memory by also using the file system cache to store data.
Quick I/O for Databases Cached Quick I/O For Databases You can make this setting persistent across mounts by adding a file system entry in the file /etc/vx/tunefstab. For example: /dev/vx/dsk/datadg/database01 qio_cache_enable=1 /dev/vx/dsk/datadg/database02 qio_cache_enable=1 For information on how to add tuning parameters, see the tunefstab(4) manual page. Enabling Cached Quick I/O for Individual Files There are several ways to enable caching for a Quick I/O file.
Quick I/O for Databases Cached Quick I/O For Databases qio_cache_enable = 1 For more information on the format of the /etc/vx/qioadmin file and the command syntax, see the qioadmin(1) manual page. NOTE Check the setting of the flag qio_cache_enable using the vxtunefs command, and the individual cache advisories for each file, to verify caching. Tuning Cached Quick I/O Not all database files can take advantage of caching.
Quick I/O for Databases Quick I/O Statistics Quick I/O Statistics Quick I/O provides the qiostat utility to collect database I/O statistics generated over a period of time. qiostat reports statistics such as the number of read and write operations, the number of blocks read or written, and the average time spent on read and write operations during an interval. See the qiostat(1) manpage for more information.
Quick I/O for Databases Quick I/O Summary Quick I/O Summary To increase database performance on a VxFS file system using Quick I/O: 1. Make sure that the VERITAS Editions product is installed: # swinstall | grep VRTSdbed 2. Make sure that the VERITAS Quick I/O package is licensed: # vxlicrep | VXFDD 3. Create a regular VxFS file and preallocate it to required size, or use the qiomkfile command. The size of this preallocation depends on the size requirement of the database server. 4.
Quick I/O for Databases Quick I/O Summary 162 Chapter 11
A VERITAS File System Quick Reference Veritas File System Quick Reference This appendix lists the VERITAS File System (VxFS) commands and manual pages.
VERITAS File System Quick Reference Veritas File System Quick Reference Table A-1 (Continued) Command Description cfsmount,cfsumount2 Mounts or unmounts a cluster file system. df Reports the number of free disk blocks and inodes for a VxFS file system. fcladm4 VxFS File Change Log administration utility. ff Lists file names and inode information for a VxFS file system. fsadm Resizes or defragments a VxFS file system. fsapadm4 VxFS allocation policy administration utility.
VERITAS File System Quick Reference Veritas File System Quick Reference Table A-1 (Continued) Command Description fsvoladm4 VxFS device administration utility. getext Gets extent attributes for a VxFS file system. glmconfig2 Group Lock Manager (GLM) configuration utility. mkfs Constructs a VxFS file system. mount Mounts a VxFS file system. ncheck Generates path names from inode numbers for a VxFS file system. qioadmin1 VxFS Quick I/O for Databases cache administration utility.
VERITAS File System Quick Reference Veritas File System Quick Reference Table A-1 (Continued) Command Description 1 Functionality available only with VERITAS Quick I/O for Databases feature 2 Functionality available only with the VERITAS Cluster File System product 3 Functionality available only with the VERITAS Quality of Storage Service option 4 New in VxFS 4.1 Online Manual Pages This release includes the following online manual pages as part of the VRTSvxfs package.
VERITAS File System Quick Reference Veritas File System Quick Reference Table A-2 (Continued) Section1 Description df_vxfs Reports the number of free disk blocks and inodes for a VxFS file system. fcladm4 VxFS File Change Log administration utility. ff_vxfs Lists file names and inode information for a VxFS file system. fsadm_vxfs Resizes or reorganizes a VxFS file system. fsapadm4 VxFS allocation policy administration utility. fscat_vxfs Cats a VxFS file system.
VERITAS File System Quick Reference Veritas File System Quick Reference Table A-2 (Continued) Section1 Description ncheck_vxfs Generates path names from inode numbers for a VxFS file system. setext Sets extent attributes on a file in a VxFS file system. vxdump Incremental file system dump. vxfsconvert Converts an unmounted file system to VxFS or upgrades a VxFS disk layout version. vxfsstat Displays file system statistics. vxlsino4 VxFS reverse path name lookup utility.
VERITAS File System Quick Reference Veritas File System Quick Reference Table A-2 (Continued) Section1 Description vxfs_ap_query_file4 Returns information about allocation policies assigned to a specified file. vxfs_ap_query_fs4 Retrieves allocation policies assigned to a specified file system. vxfs_ap_remove4 Deletes a specified allocation policy. vxfs_fcl_sync4 Sets a synchronization point in the VxFS File Change Log. vxfs_get_ioffsets Obtains VxFS inode field offsets.
VERITAS File System Quick Reference Veritas File System Quick Reference Table A-2 (Continued) Section1 Description vxfs_vol_stat4 Returns free space information about a component volume within a multi-volume file system. Section 4 Description fs_vxfs Format of a VxFS file system volume. inode_vxfs Format of a VxFS file system inode. tunefstab VxFS file system tuning parameters table. Section 7 Description vxfsio VxFS file system control functions.
VERITAS File System Quick Reference Veritas File System Quick Reference -o N Displays the geometry of the file system and does not write to the device. -o largefiles Allows users to create files larger than two gigabytes. The default option is largefiles. special The character (raw) device or VERITAS Volume Manager volume. size The size of the new file system (in sectors).
VERITAS File System Quick Reference Veritas File System Quick Reference -s size Directs vxfsconvert to use free disk space past the current end of the file system to store VxFS metadata. -v Specifies verbose mode. -y|Yspecial Assumes a yes response to all questions asked by vxfsconvert. See the vxfsconvert(1M) manual page for more information about converting a UFS file system to a VxFS file system.
VERITAS File System Quick Reference Veritas File System Quick Reference 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 Veritas File System Quick Reference • fsckptadm(1M) • mount(1M) • mount_vxfs(1M) Example A-2 To mount the file system /dev/vx/dsk/fsvol/vol1 on the /ext directory with read/write access and delayed logging Enter: # mount -F vxfs -o delaylog /dev/vx/dsk/fsvol/vol1 /ext How to Edit the fstab File You can edit the /etc/fstab file to automatically mount a file system at boot time.
VERITAS File System Quick Reference Veritas File System Quick Reference /dev/vx/dsk/fsvol /ext vxfs delaylog 0 2 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).
VERITAS File System Quick Reference Veritas File System Quick Reference Example A-5 When invoked without options, the mount command displays file system information similar to the following: # mount /dev/vg00/lvol3 on / type vxfs ioerror=mwdisable,delaylog Wed Jun 5 \ 3:23:40 2004 /dev/vg00/lvol8 on /var type vxfs ioerror=mwdisable,delaylog Wed Jun 5 \ 3:23:56 2004 /dev/vg00/lvol7 on /usr type vxfs ioerror=mwdisable,delaylog Wed Jun 5 \ 3:23:56 2004 /dev/vg00/lvol6 on /tmp type vxfs ioerror=mwdisable,dela
VERITAS File System Quick Reference Veritas File System Quick Reference • fstyp(1M) Example A-6 To find out what kind of file system is on the device /dev/vx/dsk/fsvol/vol1 Enter: # fstyp -v /dev/vx/dsk/fsvol/vol1 The output indicates that the file system type is vxfs, and displays file system information similar to the following: vxfs version: 6 f_bsize: 8192 f_frsize: 1024 f_blocks: 1027432 f_bfree: 1026075 f_bavail: 961946 f_files: 256548 f_ffree: 256516 f_favail: 256516 f_fsid: 520114176 f_basetype:
VERITAS File System Quick Reference Veritas File System Quick Reference Version 6 disk layout file system can be increased depends on the file system block size (as shown in the tables under "VxFS Version5 Disk Layout" on page 208 and "VxFS Version 6 Disk Layout" on page 209). See the following manual pages for more information about resizing file systems: • extendfs(1M) • fsadm_vxfs(1M) How to Extend a File System Using fsadm If a VxFS file system is not large enough, you can increase its size.
VERITAS File System Quick Reference Veritas File System Quick Reference To decrease the size of a VxFS file system, use the syntax: fsadm [-F vxfs] [-b newsize] [-r rawdev] mount_point vxfs The file system type. newsize The size (in sectors) to which the file system will shrink. mount_point The file system’s mount point. -r rawdev Specifies the path name of the raw device if there is no entry in /etc/fstab and fsadm cannot determine the raw device.
VERITAS File System Quick Reference Veritas File System Quick Reference -r rawdev Example A-9 Specifies the path name of the raw device if there is no entry in /etc/fstab and fsadm cannot determine the raw device. To reorganize the VxFS file system mounted at /ext Enter: # fsadm -F vxfs -EeDd /ext 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 Veritas File System Quick Reference 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 Veritas File System Quick Reference -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. Example A-12 To back up the VxFS snapshot file system mounted at /snapmount to the tape drive with device name /dev/rmt Enter: # vxdump -cf /dev/rmt /snapmount How to Restore a File System After backing up the file system, you can restore it using the vxrestore command.
VERITAS File System Quick Reference Veritas File System Quick Reference How to Turn On Quotas You can enable quotas at mount time or after a file system is mounted. The root directory of the file system must contain a file named quotas that is owned by root.
VERITAS File System Quick Reference Veritas File System Quick Reference To invoke the quota editor, use the syntax: edquota username To modify the time limit, use the syntax: edquota -t How to View Quotas The superuser or individual user can view disk quotas and usage on VxFS file systems using the quota command. To view quotas for a specific user, use the syntax: quota -v username This command displays the user’s quotas and disk usage on all mounted VxFS file systems where the quotas file exists.
B Kernel Messages Kernel Messages 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 Kernel Messages Disabling Transactions If the file system detects an error while writing the intent log, it disables transactions. After transactions are disabled, the files in the file system can still be read or written, but no block or inode frees or allocations, structural changes, directory entry changes, or other changes to metadata are allowed. Disabling a File System If an error occurs that compromises the integrity of the file system, VxFS disables itself.
Kernel Messages Kernel Messages Each message is also written to an internal kernel buffer that you can view in the file /var/adm/syslog/syslog.log. In some cases, additional data is written to the kernel buffer. For example, if an inode is marked bad, the contents of the bad inode are written. When an error message is displayed on the console, you can use the unique message ID to find the message in /var/adm/syslog/syslog.log and obtain the additional information.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 002 Message and Definition WARNING: msgcnt x: mesg 002: V-2-02: vx_snap_strategy - mount_point file system write attempt to read-only file system WARNING: msgcnt x: mesg 002: V-2-02: 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 Table B-1 (Continued) Message Number 003, 004, 005 Message and Definition WARNING: msgcnt x: mesg 003: V-2-03: vx_mapbad - mount_point file system free extent bitmap in au aun marked bad. WARNING: msgcnt x: mesg 004: V-2-04: vx_mapbad - mount_point file system free inode bitmap in au aun marked bad. WARNING: msgcnt x: mesg 005: V-2-05: vx_mapbad - mount_point file system inode extended operation bitmap in au aun marked bad.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 006, 007 Message and Definition WARNING: msgcnt x: mesg 006: V-2-06: vx_sumupd - mount_point file system summary update in au aun failed WARNING: msgcnt x: mesg 007: V-2-07: vx_sumupd - mount_point file system summary update in inode au iaun 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 Table B-1 (Continued) Message Number 010 Message and Definition WARNING: msgcnt x: mesg 010: V-2-10: vx_ialloc - mount_point file system inode inumber not free • Description When the kernel allocates an inode from the free inode bitmap, it checks the mode and link count of the inode. If either is non-zero, the free inode bitmap or the inode list is corrupted.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 013 Message and Definition WARNING: msgcnt x: mesg 013: V-2-13: vx_iposition - mount_point file system inode inumber invalid inode list extent • Description For a Version 2 and above disk layout, the inode list is dynamically allocated. When the kernel tries to read an inode, it must look up the location of the inode in the inode list file. If the kernel finds a bad extent, the inode can’t be accessed.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 015 Message and Definition WARNING: msgcnt x: mesg 015: V-2-15: vx_ibadinactive - mount_point file system can’t mark inode inumber bad msgcnt x: mesg 015: V-2-15: vx_ilisterr - mount_point file system can’t mark inode inumber bad • Description An attempt to mark an inode bad on disk, and the super-block update to set the VX_FULLFSCK flag, failed.
Kernel Messages Kernel Messages Table B-1 Message Number 017 (Continued) Message and Definition WARNING: msgcnt x: mesg 017: V-2-17: vx_attr_getblk - mount_point file system inode inumber marked bad in core WARNING: msgcnt x: mesg 017: V-2-17: vx_attr_iget - mount_point file system inode inumber marked bad in core WARNING: msgcnt x: mesg 017: V-2-17: vx_attr_iget - mount_point file system inode inumber marked bad in core WARNING: msgcnt x: mesg 017: V-2-17: vx_attr_indadd - mount_point file system inode in
Kernel Messages Kernel Messages Table B-1 Message Number 017 (Continued) Message and Definition WARNING: msgcnt x: mesg 017: V-2-17: vx_enter_ext4 - mount_point file system inode inumber marked bad in core WARNING: msgcnt x: mesg 017: V-2-17: vx_exttrunc - mount_point file systeminode inumber marked bad in core WARNING: msgcnt x: mesg 017: V-2-17: vx_get_alloc - mount_point file system inode inumber marked bad in core WARNING: msgcnt x: mesg 017: V-2-17: vx_ilisterr - mount_point file system inode inumber
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 017 Message and Definition WARNING: msgcnt x: mesg 017: V-2-17: vx_stablestore - mount_point file system inode inumber marked bad in core WARNING: msgcnt x: mesg 017: V-2-17: vx_tranitimes - mount_point file system inode inumber marked bad in core WARNING: msgcnt x: mesg 017: V-2-17: vx_trunc - mount_point file system inode inumber marked bad in core WARNING: msgcnt x: mesg 017: V-2-17: vx_write_alloc2 - mount_point file system inode in
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 017 Message and Definition • Action Check the console log for I/O errors. If the problem is a disk failure, replace the disk. If the problem is not related to an I/O failure, find out how the disk became corrupted. If no user or process is writing to the device, report the problem to your customer support organization. In either case, unmount the file system.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 021 Message and Definition WARNING: msgcnt x: mesg 021: V-2-21: vx_fs_init - mount_point file system validation failure • Description When a VxFS file system is mounted, the structure is read from disk. If the file system is marked clean, the structure is correct and the first block of the intent log is cleared. If there is any I/O problem or the structure is inconsistent, the kernel sets the VX_FULLFSCK flag and the mount fails.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 022 Message and Definition WARNING: msgcnt x: mesg 022: V-2-22: 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 Table B-1 (Continued) Message Number 023 Message and Definition WARNING: msgcnt x: mesg 023: V-2-23: vx_unmountroot - root file system is busy and can’t be unmounted cleanly • Description There were active files in the file system and they caused the unmount to fail. When the system is halted, the root file system is unmounted. This happens occasionally when a process is hung and it can’t be killed before unmounting the root.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 025 Message and Definition WARNING: msgcnt x: mesg 025: V-2-25: vx_wsuper - mount_point file system super-block update failed • Description An I/O error occurred while writing the super-block during a resize operation. The file system is disabled. • Action Unmount the file system and use fsck to run a full structural check. Check the console log for I/O errors.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 027 Message and Definition WARNING: msgcnt x: mesg 027: V-2-27: 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.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 029,030 Message and Definition WARNING: msgcnt x: mesg 029: V-2-29: vx_snap_getbp - mount_point snapshot file system block map write error msgcnt x: mesg 030: V-2-30: vx_snap_getbp - mount_point snapshot file system block map read error • Description During a snapshot backup, each snapshot file system maintains a block map on disk.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 033 Message and Definition WARNING: msgcnt x: mesg 033: V-2-33: vx_check_badblock - mount_point file system had an I/O error, setting VX_FULLFSCK • Description When the disk driver encounters an I/O error, it sets a flag in the super-block structure. If the flag is set, the kernel will set the VX_FULLFSCK flag as a precautionary measure. Since no other error has set the VX_FULLFSCK flag, the failure probably occurred on a data block.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 036 Message and Definition WARNING: msgcnt x: mesg 036: V-2-36: vx_lctbad - mount_point file system link count table lctnumber bad • Description Update to the link count table (LCT) failed. For a Version 2 and above disk layout, the LCT contains the link count for all the structural inodes. 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 Table B-1 (Continued) Message Number 038 Message and Definition WARNING: msgcnt x: mesg 038: V-2-38: 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.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 039 Message and Definition WARNING: msgcnt x: mesg 039: V-2-39: vx_writesuper - file system super-block write error • Description An attempt to write the file system super block failed due to a disk I/O error. If the file system was being mounted at the time, the mount will fail.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 041 Message and Definition WARNING: msgcnt x: mesg 041: V-2-41: vx_dqget - mount_point file system user quota file can’t read quota for id id • Description A read of the user quotas file failed for the uid. The quotas file keeps track of the total number of blocks and inodes used by each user, and contains soft and hard limits for each user ID. The VX_FULLFSCK flag is set in the super-block.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 044 Message and Definition WARNING: msgcnt x: mesg 044: V-2-44: vx_bsdquotaupdate - mount_point file system user 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 Table B-1 (Continued) Message Number 047 Message and Definition WARNING: msgcnt x: mesg 047: V-2-47: vx_bsdiquotaupdate - warning: mount_point file system user id inode quota exceeded • Description The soft limit on inodes was exceeded. The soft limit can be exceeded for a certain amount of time before attempts to create new files begin to fail. Once the time limit has expired, further attempts to create files owned by the user will fail.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 056 Message and Definition WARNING: msgcnt x: mesg 056: V-2-56: vx_mapbad - mount_point file system extent allocation unit state bitmap number number marked bad • Description If there is an I/O failure while writing a bitmap, the map is marked bad. The kernel considers the maps to be invalid, so does not do any more resource allocation from maps.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 058 Message and Definition WARNING: msgcnt x: mesg 058: V-2-58: vx_isum_bad - mount_point file system inode allocation unit summary number number marked bad • Description An I/O error occurred reading or writing an inode allocation unit summary. The VX_FULLFSCK flag is set. If the VX_FULLFSCK flag cannot be set, the file system is disabled. • Action Check the console log for I/O errors.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 060 Message and Definition WARNING: msgcnt x: mesg 060: V-2-60: 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 Table B-1 (Continued) Message Number 063 Message and Definition WARNING: msgcnt x: mesg 063: V-2-63: vx_fset_markbad - mount_point file system mount_point fileset (index number) marked bad • Description An error occurred while reading or writing a fileset structure. VX_FULLFSCK flag is set. If the VX_FULLFSCK flag can’t be set, the file system is disabled. • Action Unmount the file system and use fsck to run a full structural check.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 067 Message and Definition WARNING: msgcnt x: mesg 067: V-2-67: mount of device_path requires HSM agent • Description The file system mount failed because the file system was marked as being under the management of an HSM agent, and no HSM agent was found during the mount. • Action Restart the HSM agent and try to mount the file system again.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 070 Message and Definition WARNING: msgcnt x: mesg 070: V-2-70: checkpoint checkpoint_name removed from file system mount_point • Description The file system ran out of space while updating a Storage Checkpoint. The Storage Checkpoint was removed to allow the operation to complete. • Action Increase the size of the file system.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 074 Message and Definition WARNING: msgcnt x: mesg 074: V-2-74: vx_rcfg - fileset not found while remounting mount_point • Description This message is specific to the cluster file system. The message indicates a problem in a scenario where a node failure has occurred in the cluster and the newly selected primary node encounters a failure. • Action Save the core dump of the node and contact your customer support organization.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 077 Message and Definition msgcnt x: mesg 077: V-2-77: 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 Table B-1 Message Number 079 (Continued) Message and Definition WARNING: msgcnt x: mesg 017: V-2-79: vx_attr_getblk - mount_point file system inode inumber marked bad on disk WARNING: msgcnt x: mesg 017: V-2-79: vx_attr_iget - mount_point file system inode inumber marked bad on disk WARNING: msgcnt x: mesg 017: V-2-79: vx_attr_indadd - mount_point file system inode inumber marked bad on disk WARNING: msgcnt x: mesg 017: V-2-79: vx_attr_indtrunc - mount_point file system inod
Kernel Messages Kernel Messages Table B-1 Message Number 079 (Continued) Message and Definition WARNING: msgcnt x: mesg 017: V-2-79: vx_do_getpage - mount_point file system inode inumber marked bad on disk WARNING: msgcnt x: mesg 017: V-2-79: vx_enter_ext4 - mount_point file system inode inumber marked bad on disk WARNING: msgcnt x: mesg 017: V-2-79: vx_exttrunc - mount_point file system inode inumber marked bad on disk WARNING: msgcnt x: mesg 017: V-2-79: vx_get_alloc - mount_point file system inode inumb
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 079 Message and Definition WARNING: msgcnt x: mesg 017: V-2-79: vx_stablestore - mount_point file system inode inumber marked bad on disk WARNING: msgcnt x: mesg 017: V-2-79: vx_tranitimes - mount_point file system inode inumber marked bad on disk WARNING: msgcnt x: mesg 017: V-2-79: vx_trunc - mount_point file system inode inumber marked bad on disk WARNING: msgcnt x: mesg 017: V-2-79: vx_write_alloc2 - mount_point file system inode in
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 079 Message and Definition • Action Check the console log for I/O errors. If the problem is a disk failure, replace the disk. If the problem is not related to an I/O failure, find out how the disk became corrupted. If no user or process is writing to the device, report the problem to your customer support organization. In either case, unmount the file system and use fsck to run a full structural check.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 082 Message and Definition WARNING: msgcnt x: mesg 082: V-2-82: mount_point file system is on a shared volume and may become corrupted if the cluster is in a partitioned state • Description If a cluster node is in a partitioned state, and if the file system is on a shared VxVM volume, this volume may become corrupted by accidental access from another node in the cluster.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 084 Message and Definition WARNING: msgcnt x: mesg 084: V-2-84: In mount_point, during reconfiguration continuity of quota enforcement has failed. • Description In a cluster file system, when the primary of the file system fails, a secondary file system is chosen to assume the role of the primary. The assuming node will be able to enforce quotas after becoming the primary.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 087 Message and Definition WARNING: msgcnt x: mesg 087: V-2-87: vx_dotdot_manipulate: file_system file system inumber inode ddnumber dotdot inode error • Description When performing an operation that changes an inode entry, if the inode is incorrect, this message will display. • Action Run a full file system check using fsck to correct the errors.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 090 Message and Definition WARNING: msgcnt x: mesg 090: V-2-90: quota on file_system failed; soft limits greater than hard limits • Description One or more users or groups has a soft limit set greater than the hard limit, preventing the BSD quota from being turned on. • Action Check the soft limit and hard limit for every user and group and confirm that the soft limit is not set greater than the hard limit.
Kernel Messages Kernel Messages Table B-1 (Continued) Message Number 093 Message and Definition WARNING: msgcnt x: mesg 093: V-2-93: Disk layout versions older than Version 6 will not be supported for shared mounts in the next release. It is advisable to upgrade to the latest layout version now. See vxupgrade(1M) for information on upgrading a VxFS file system and see the VxFS Release Notes for information on disk layout support. • Action Upgrade your disk layout to Version 6 for shared mounts.
Kernel Messages Kernel Messages 228 Appendix B
C Disk Layout Disk Layout The disk layout is the way file system information is stored on disk. On VxFS, six different disk layout versions were created to take advantage of evolving technological developments. The disk layout versions used on VxFS were: Table C-1 Version 1 The Version 1 disk layout is the original VxFS disk layout provided with pre-2.0 versions of VxFS.
Disk Layout Disk Layout The vxupgrade command is provided to upgrade an existing VxFS file system to the Version 4, Version 5, or Version 6 disk layout while the file system remains online. You must do an upgrade in steps from older to newer layouts. See the vxupgrade(1M) manual page for details on upgrading VxFS file systems. The vxfsconvert command is provided to upgrade Version 2 and 3 disk layouts to the Version 4 disk layout while the file system is not mounted.
Disk Layout Disk Layout The Version 4 file system also moves away from the model of storing AU structural data at the start of an AU and puts all structural information in files. So expanding the file system structures simply requires extending the appropriate structural files. This removes the extent size restriction imposed by the previous layouts. All Version 4 structural files reside in the structural fileset.
Disk Layout Disk Layout The following figure shows how the kernel and utilities build information about the structure of the file system. The super-block location is in a known location from which the OLT can be located. From the OLT, the initial extents of the structural inode list can be located along with the inode number of the fileset header file. The initial inode list extents contain the inode for the fileset header file from which the extents associated with the fileset header file are obtained.
Disk Layout Disk Layout Figure C-1 Appendix C VxFS Version 4 Disk Layout 233
Disk Layout Disk Layout The VxFS Version 5 Disk Layout VxFS disk layout Version 5 is similar to Version 4. Structural files in Version 5 are the same in Version 4. However, the Version 5 disk layout supports file systems up to 32 terabytes. For a file system to take advantage of VxFS 32-terabyte support, it must be created on a VERITAS Volume Manager volume, and only on a 64-bit kernel operating system. The maximum file system size on a 32-bit kernel is still one terabyte.
Disk Layout Disk Layout Table C-3 Block Size 8192 bytes (Continued) Maximum File System Size 34,359,736,312 sectors (~ 32 TB) Note: Sector size in bytes specified by the DEV_BSIZE system parameter. If you specify the file system size when creating a file system, the block size defaults to the appropriate value as shown above. See the mkfs(1M) manual page for more information.
Disk Layout Disk Layout 236 Appendix C
Glossary A B Acess Control Lists The information that identifies specific users or groups and their access privileges for a particular file or directory. Block-Level Incremental Backup (BLI Backup) agent A process that manages predefined VERITAS Cluster Server (VCS) resource types. Agents bring resources online, take resources offline, and monitor resources to report any state changes to VCS.
Glossary data synchronous writes data synchronous writes A form of synchronous I/O that writes the file data to disk before the write returns, but only marks the inode for later update. If the file size changes, the inode will be written before the write returns. In this mode, the file data is guaranteed to be on the disk before the write returns, but the inode modification times may be lost if the system crashes.
Glossary node abort I indirect address extent An extent that contains references to other extents, as opposed to file data itself. A single indirect address extent references indirect data extents. A double indirect address extent references single indirect address extents. indirect data extent An extent that contains file data and is referenced via an indirect address extent. inode A unique identifier for each file within a file system that contains the data and metadata associated with that file.
Glossary node join node join The process through which a node joins a cluster and gains access to shared disks. O object location table (OLT) The information needed to locate important file system structural elements. The OLT is written to a fixed location on the underlying media (or disk). object location table replica A copy of the OLT in case of data corruption. The OLT replica is written to a fixed location on the underlying media (or disk).
Glossary VxVM soft limit The soft limit is lower than a hard limit. The soft limit can be exceeded for a limited time. U There are separate time limits for files and blocks. See also hard limit and quota.. Unbuffered I/O I/O that bypasses the kernel cache to increase I/O performance. This is similar to direct I/O, except when a file is extended; for direct I/O, the inode is written to disk synchronously, for unbuffered I/O, the inode update is delayed. See also buffered I/O and direct I/O.
Glossary VxVM 242 Glossary