VERITAS Storage Foundation 4.1 Oracle Administrator's Guide

Chapter 2, Setting Up Databases
Prerelease 8 September 2005, 8:54am Understanding Fragmentation
77
Monitoring Fragmentation
You can monitor fragmentation in VxFS by running reports that describe fragmentation levels. Use
the fsadm command to run reports on directory fragmentation and extent fragmentation. The df
command, which reports on file system free space, also provides information useful in monitoring
fragmentation.
Use the following commands to report fragmentation information:
fsadm -D, which reports on directory fragmentation.
fsadm -E, which reports on extent fragmentation.
/usr/bin/df -F vxfs -o s, which prints the number of free extents of each size.
Defragmenting a File System
You can use the online administration utility fsadm to defragment or reorganize file system
directories and extents. The fsadm utility defragments a file system mounted for read/write access
by:
Removing unused space from directories.
Making all small files contiguous.
Consolidating free blocks for file system.
The following options are for use with the fsadm utility:
Options
-d Reorganizes directories. Directory entries are reordered to place subdirectory entries
first, then all other entries in decreasing order of time of last access. The directory is also
compacted to remove free space.
-a Use in conjunction with the -d option to consider files not accessed within the specified
number of days as “aged” files. Aged files are moved to the end of the directory. The
default is 14 days.
-e Reorganizes extents. Files are reorganized to have the minimum number of extents.
-D -E Produces reports on directory and extent fragmentation, respectively.
-v Specifies verbose mode and reports reorganization activity.
-l Specifies the size of a file that is considered large. The default is 64 blocks.
-t Specifies a maximum length of time to run, in seconds.
-p Specifies a maximum number of passes to run. The default is five.
-s Prints a summary of activity at the end of each pass.