Chapter 14 Journaled File System (JFS) HP-UX Handbook Revision 13.
Chapter 14 Journaled File System (JFS) October 29, 2013 TERMS OF USE AND LEGAL RESTRICTIONS FOR THE HP-UX RECOVERY HANDBOOK ATTENTION: PLEASE READ THESE TERMS CAREFULLY BEFORE USING THE HP-UX HANDBOOK. USING THESE MATERIALS INDICATES THAT YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THESE TERMS, DO NOT USE THE HP-UX HANDBOOK. THE HP-UX HANDBOOK HAS BEEN COMPILED FROM THE NOTES OF HP ENGINEERS AND CONTAINS HP CONFIDENTIAL INFORMATION.
Chapter 14 Journaled File System (JFS) October 29, 2013 TABLE OF CONTENTS Introduction: _____________________________________________________________________ 6 Veritas File System (VxFS) __________________________________________________________________6 Logging ________________________________________________________________________________6 Extents_________________________________________________________________________________7 File system disk layouts _________________________________________________
Chapter 14 Journaled File System (JFS) October 29, 2013 Message: 003, 004, 005 _____________________________________________________________ 26 Message: 006, 007 _________________________________________________________________27 Message: 008, 009 _________________________________________________________________27 Message: 010 _____________________________________________________________________27 Message: 011 _____________________________________________________________________28 Message: 012 __________
Chapter 14 Journaled File System (JFS) October 29, 2013 Intent Log _______________________________________________________________ 43 Write __________________________________________________________________43 Other __________________________________________________________________43 Features that are Treated Differently between JFS and OnlineJFS __________________________ 44 Extension of a file system ________________________________________________
Chapter 14 Journaled File System (JFS) October 29, 2013 Introduction: The VERITAS File System, (or VxFS, called JFS and OnlineJFS in HP-UX), is an extent-based file system. It was originally developed by VERITAS Software.] Through an OEM agreement, VxFS is used as the primary files system of the HP-UX operating system. With on-line defragmentation and resize support turned on via license, it is known as OnlineJFS. The current revision is 5.
Chapter 14 Journaled File System (JFS) October 29, 2013 transactions. When the system is halted unexpectedly, this log can be replayed and outstanding transactions completed. The check and repair time for file systems can be reduced to a few seconds, regardless of the file system size. By default, VxFS file systems log file transactions before they are committed to disk, reducing time spent checking and repairing file systems after the system is halted unexpectedly.
Chapter 14 Journaled File System (JFS) October 29, 2013 Version 7 extends support for multiple volumes to permit Dynamic Storage Tiering. Dynamic Storage Tiering allows root users to move files among different volumes, allocate files to different volumes at file creation time based on policy, and independently recover volumes, without altering the namespace of the file system. Version 7 was introduced in VxFS 5.0 VxFS 5.
Chapter 14 • • • • • • • Journaled File System (JFS) October 29, 2013 o VxFS supports files larger than two terabytes and large file systems up to 256 terabytes. Online backup o VxFS provides online data backup using the snapshot feature. Quotas o VxFS supports quotas, which allocate per-user and per-group quotas and limit the use of two principal resources: files and data blocks.
Chapter 14 Journaled File System (JFS) October 29, 2013 • Do not upgrade the operating system and the Veritas products simultaneously. HP recommends that clients first upgrade the operating system and later upgrade the Veritas products. NOTE: In VxFS 4.1 the default disk layout was version 6.
Chapter 14 Journaled File System (JFS) October 29, 2013 system use the vxupgrade command as described in step 8. You must run fsck after vxfsconvert as vxfsconvert does not create all metadata files. 8. To run the VxFS-specific full fsck on the converted file system, enter the following: # fsck -F vxfs -y -o full During pass 4, fsck displays several error messages that require a yes response to complete the conversion process. 9.
Chapter 14 Journaled File System (JFS) October 29, 2013 group::perm group:gid:perm class:perm other:perm default:user::perm default:user:uid:perm default:group::perm default:group:gid:perm default:class:perm default:other:perm 2) setacl - modify access control lists (ACLs) for files (JFS File systems only) Example: To add one ACL entry to file “testfile”, giving user root read permission only, type: # setacl -m user:root:r - - testfile # getacl testfile # file: testfile # owner: root # group: sys user::r
Chapter 14 Journaled File System (JFS) October 29, 2013 # touch //quotas (must be owned by root) setting quotalimits for a via edquota (can be used like vi)user: #edquota e.g.
Chapter 14 Journaled File System (JFS) October 29, 2013 Support for databases Databases are usually created on file systems to simplify backup, copying, and moving tasks and are slower compared to databases on raw disks. Using Quick I/O for Databases feature with VxFS lets systems retain the benefits of having a database on a file system without sacrificing performance. Veritas Quick I/O creates regular, pre-allocated files to use as character devices.
Chapter 14 Journaled File System (JFS) October 29, 2013 (VxVM). 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. NOTE: FCL functionality is a separately licensed feature.
Chapter 14 Journaled File System (JFS) October 29, 2013 Veritas File System performance enhancements Traditional file systems employ block-based allocation schemes that provide adequate random access and latency for small files, but which limit throughput for larger files. As a result, they are less than optimal for commercial environments. VxFS addresses this file system performance issue through an alternative allocation method and increased user control over allocation, I/O, and caching policies.
Chapter 14 Journaled File System (JFS) October 29, 2013 The following is an example tunefstab file: /dev/vx/dsk/userdg/netbackup read_pref_io=128k,write_pref_io=128k,read_nstream=4,write_nstream=4 /dev/vx/dsk/userdg/metasave read_pref_io=128k,write_pref_io=128k,read_nstream=4,write_nstream=4 /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/solpatc
Chapter 14 Journaled File System (JFS) October 29, 2013 The number of parallel read requests of size read_pref_io to have outstanding at one time. The file system uses the product of read_nstream multiplied by read_pref_io to determine its read ahead size. The default value for read_nstream is 1. write_nstream The number of parallel write requests of size write_pref_io to have outstanding at one time.
Chapter 14 Journaled File System (JFS) October 29, 2013 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.
Chapter 14 Journaled File System (JFS) October 29, 2013 usage has limitations depending on how the space within an HSM-controlled file is managed. NOTE: It is advisable to use hsm_write_ prealloc only when recommended by the HSM application controlling the file system. max_seqio_extent_size Changes the default initial extent size. VxFS determines, based on the first write to a new file, the size of the first extent to be allocated to the file.
Chapter 14 Journaled File System (JFS) October 29, 2013 on workloads where the I/O is random or is done in small chunks. 8K bytes is the default value. inode_aging_size Specifies the minimum size to qualify a deleted inode for inode aging. Inode aging is used in conjunction with file system Storage Checkpoints to allow quick restoration of large, recently deleted files. For best performance, it is advisable to age only a limited number of larger files before completion of the removal process.
Chapter 14 Journaled File System (JFS) October 29, 2013 When the file stops being written, any unused space is freed for other files to use. Normally this allocation stops increasing the size of extents at 2048 blocks which prevents one file from holding too much unused space. max_seqio_extent_size is measured in file system blocks. max_seqio_extent_size is 2048. The default and minimum value of default_indir_ size On VxFS, files can have up to ten direct extents of variable size stored in the inode.
Chapter 14 Journaled File System (JFS) October 29, 2013 read_ahead The default for all VxFS read operations is to perform sequential read ahead. You can specify the read_ahead cache advisory to implement the VxFS enhanced read ahead functionality. This allows read aheads to detect more elaborate patterns, such as increasing or decreasing read offsets or multithreaded file accesses, in addition to simple sequential reads.
Chapter 14 Journaled File System (JFS) October 29, 2013 Depending on the speed of the storage device, if you lower write_throttle, user write performance may suffer, but the number of dirty buffers is limited, so sync operations complete much faster.
Chapter 14 Journaled File System (JFS) October 29, 2013 check the syslog for I/O errors. JFS Error Codes Most messages can appear in one of two forms. The first form applies to the file system in general. The second form is specific to the structural file set within the file system. Messages of the second form contain the string (structural) to indicate that they occurred in the structural file set.
Chapter 14 Journaled File System (JFS) October 29, 2013 /var/adm/messages. 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 is written. When an error message is displayed on the console, you can use the unique message ID to find the message in /var/adm/messages and obtain the additional information.
Chapter 14 Journaled File System (JFS) October 29, 2013 the bitmap, the file system has been corrupted. This may have occurred because a user or process wrote directly to the device or used fsdb to change the file system. The VX_FULLFSCK flag is set. If the map that failed was a free extent bitmap, and the VX_FULLFSCK flag can't be set, then the file system is disabled. Action: Check the console log for I/O errors. If the problem is a disk failure,replace the disk.
Chapter 14 Journaled File System (JFS) October 29, 2013 inumber not free Explanation: 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. The VX_FULLFSCK flag is set in the super-block so that fsck will do a full structural check the next time it is run. Action: Unmount the file system and use fsck to run a full structural check.
Chapter 14 Journaled File System (JFS) October 29, 2013 Action: Look at the processes that are running and determine which processes are using inodes. If it appears there are runaway processes, they might be tying up the inodes. If the system load appears normal, increase the vxfs_ninode parameter in the kernel .
Chapter 14 Journaled File System (JFS) October 29, 2013 system inode inumber marked bad WARNING: msgcnt x: vxfs: mesg 017: vx_delbuf_flush - mount_point file system inode inumber marked bad WARNING: msgcnt x: vxfs: mesg 017: vx_dio_iovec - mount_point file system inode inumber marked bad WARNING: msgcnt x: vxfs: mesg 017: vx_dirbread - mount_point file system inode inumber marked bad WARNING: msgcnt x: vxfs: mesg 017: vx_dircreate - mount_point file system inode inumber marked bad WARNING: msgcnt x: vxfs
Chapter 14 Journaled File System (JFS) October 29, 2013 WARNING: msgcnt x: vxfs: mesg 017: vx_stablestore - mount_point file system inode inumber marked bad WARNING: msgcnt x: vxfs: mesg 017: vx_tranitimes - mount_point file system inode inumber marked bad WARNING: msgcnt x: vxfs: mesg 017: vx_trunc - mount_point file system inode inumber marked bad WARNING: msgcnt x: vxfs: mesg 017: vx_write_alloc2 - mount_point file system inode inumber marked bad WARNING: msgcnt x: vxfs: mesg 017: vx_write_default - m
Chapter 14 Journaled File System (JFS) October 29, 2013 Message: 019 WARNING: msgcnt x: vxfs: mesg 019: vx_log_add - mount_point file system log overflow Explanation: Log ID overflow. When the log ID reaches VX_MAXLOGID (approximately one billion by default), a flag is set so the file system resets the log ID at the next opportunity. If the log ID has not been reset, when the log ID reaches VX_DISLOGID (approximately VX_MAXLOGID plus 500 million by default), the file system is disabled.
Chapter 14 Journaled File System (JFS) October 29, 2013 first mounted, it is mounted for read-only access. After fsck is run, the file system is remounted for read/write access. The remount fails if fsck completed a resize operation or modified a file that was opened before the fsck was run. It also fails if an I/O error occurred during the remount. Usually, the system halts or reboots automatically. Action:Reboot the system.
Chapter 14 Journaled File System (JFS) October 29, 2013 Message: 026 WARNING: msgcnt x: vxfs: mesg 026: vx_snap_copyblk - mount_point primary file system read error Explanation: Snapshot file system error. When the primary file system is written,copies of the original data must be written to the snapshot file system. If a read error occurs on a primary file system during the copy, any snapshot file system that doesn't already have a copy of the data is out of date and must be disabled.
Chapter 14 Journaled File System (JFS) October 29, 2013 Message: 029, 030 WARNING: msgcnt x: vxfs: mesg 029: vx_snap_getbp - mount_point snapshot file system block map write error WARNING: msgcnt x: vxfs: mesg 030: vx_snap_getbp - mount_point snapshot file system block map read error Explanation: During a snapshot backup, each snapshot file system maintains a block map on disk. The block map tells the snapshot file system where data from the primary file system is stored in the snapshot file system.
Chapter 14 Journaled File System (JFS) October 29, 2013 mounted for write access. Message: 034 WARNING: msgcnt x: vxfs: mesg 034: vx_resetlog - mount_point file system can't reset log Explanation: The kernel encountered an error while resetting the log ID on the file system. This happens only if the super-block update or log write encountered a device failure. The file system is disabled to preserve its integrity. Action: Unmount the file system and use fsck to run a full structural check.
Chapter 14 Journaled File System (JFS) October 29, 2013 log for I/O errors. If the disk has a hardware failure, it should be repaired before the file system is mounted for write access. Message: 039 WARNING: msgcnt x: vxfs: mesg 039: vx_dqget - mount_point file system user quota file can't read quota for id Explanation: A read of the user quotas file failed for the uid.
Chapter 14 Journaled File System (JFS) October 29, 2013 Message: 043 WARNING: msgcnt x: vxfs: mesg 043: vx_bsdiquotaupdate - mount_point file system user id inode limit reached. Explanation: The hard limit on inodes was exceeded. Further attempts to create files owned by the user will fail. Action: Remove some files to free inodes.
Chapter 14 Journaled File System (JFS) October 29, 2013 Message: 048 WARNING: msgcnt x: vxfs: mesg 048: vx_mapbad - mount_point file system extent allocation unit state bitmap number marked bad Explanation: 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.
Chapter 14 Journaled File System (JFS) October 29, 2013 Message: 051 WARNING: msgcnt x: vxfs: mesg 051: vx_snap_getbitbp - mount_point snapshot file system bitmap write error Explanation: An I/O error occurred while writing to the snapshot file system bitmap. There is no problem with the 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.
Chapter 14 Journaled File System (JFS) October 29, 2013 and contact their customer support organization. Message: 055 WARNING: msgcnt x: vxfs: mesg 055: vx_metaioerr - file system meta data error Explanation: A read or a write error occurred while accessing file system metadata. The full fsck flag on the file system was set. The message specifies whether the disk I/O that failed was a read or a write. File system metadata includes inodes, directory blocks, and the file system log.
Chapter 14 Journaled File System (JFS) October 29, 2013 mount_point fileset (index number) marked bad Explanation: 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.
Chapter 14 Journaled File System (JFS) October 29, 2013 Intent Log log delaylog tmplog nolog all metadata changes are logged immediately (default) only critical metadata changes are logged immediately metadata changes logging is almost always delayed intend log is disabled Write direct dsync closesync tmpcache direct writes datasynchronous writes sync on close writes temporary caching Further there is the possibility to determine how ordinary/synchronous writes a
Chapter 14 Journaled File System (JFS) October 29, 2013 f_files: 3920 f_ffree: 4656 f_favail: 4656 f_fsid: 1073741829 f_basetype: vxfs f_namemax: 254 f_magic: a501fcf5 f_featurebits: 0 f_flag: 16 <= Largefiles f_fsindex: 5 f_size: 20480 Features that are Treated Differently between JFS and OnlineJFS Extension of a file system Base JFS # umount # lvextend –L /dev/vgXX/lvolX -L set new size of lvol to n MB # extendfs –F vxfs /dev/vgXX/rlvolX # mount Online JFS # lvextend
Chapter 14 Journaled File System (JFS) October 29, 2013 # newfs –F vxfs /dev/vgXX/rlvolX # mount /dev/vgXX/lvolX Online JFS Only file systems which are multiple of 32 MB can be reduced online (it depends on the allocated extent distribution).
Chapter 14 Journaled File System (JFS) October 29, 2013 Features Only Available for OnlineJFS Defragmentation of a file system # fsadm –F vxfs –d –D –e –E -d -D -e -E performs a directory defragmentation reports on directory fragmentation performs a file extent defragmentation reports on file extent fragmentation Typically directory defragmentation is not beneficial in improving performance.
Chapter 14 Journaled File System (JFS) October 29, 2013 is allocated until the final close of the file, when any space not used by the file is freed.