HP-UX Reference (11i v1 00/12) - 1M System Administration Commands A-M (vol 3)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1m/!!!intro.1m
________________________________________________________________
___ ___
f
fsadm_vxfs(1M) fsadm_vxfs(1M)
For compression, fsadm moves valid entries to the front of the directory and groups the free space at the
end of the directory. If there are no entries in the last block of the directory, the block is released and the
directory size is reduced.
If the total space used by all directory entries is small enough, fsadm puts the directory in the inode
immediate data area.
fsadm also sorts directory entries to improve pathname lookup performance. Entries are sorted based on
the last access time of the entry. The -a option specifies a time interval; 14 days is the default if -a is not
specified. The time interval is broken up into 128 buckets, and all times within the same bucket are con-
sidered equal. All access times older than the time interval are considered equal, and those entries are
placed last. Subdirectory entries are placed at the front of the directory and symbolic links are placed after
subdirectories, followed by the most-recently-accessed files.
The command syntax for reorganizing directories in a file system is:
fsadm -d [-D][-v][-s][-a days][-p passes][-r rawdev][-t time] mount_point
The following example shows the output of the fsadm -d -D command:
#fsadm -F vxfs -d -D -s /opt
Directory Fragmentation Report
Dirs Total Immed Immeds Dirs to Blocks to
Searched Blocks Dirs to Add Reduce Reduce
total 34663 8800 26655 2569 2716 2836
Directory Reorganization Statistics (pass 1 of 2)
Dirs Dirs Total Failed Blocks Blocks Immeds
Searched Changed Ioctls Ioctls Reduced Changed Added
fset 999 8008 3121 5017 0 3037 4428 2569
total 8008 3121 5017 0 3037 4428 2569
Directory Reorganization Statistics (pass 2 of 2)
Dirs Dirs Total Failed Blocks Blocks Immeds
Searched Changed Ioctls Ioctls Reduced Changed Added
fset 999 5439 552 2448 0 708 4188 0
total 5439 552 2448 0 708 4188 0
Directory Fragmentation Report
Dirs Total Immed Immeds Dirs to Blocks to
Searched Blocks Dirs to Add Reduce Reduce
total 34663 6231 29224 0 147 267
The column labeled "Dirs Searched" contains the number of directories searched. Only directories with
data extents are reorganized. Immediate directories are skipped. The column labeled "Dirs Changed" con-
tains the number of directories for which a change was made.
The column labeled "Total Ioctls" contains the total number of VX_DIRSORT ioctls performed. Reorganiza-
tion of directory extents is performed using this ioctl.
The column labeled "Failed Ioctls" contains the number of requests that failed for some reason. The reason
for failure is usually that the directory being reorganized is active. A few failures should be no cause for
alarm. If the -v option is used, all ioctl calls and status returns are recorded.
The column labeled "Blocks Reduced" contains the total number of directory blocks freed by compressing
entries. The column labeled "Blocks Changed" contains the total number of directory blocks updated while
sorting and compressing entries.
The column labeled "Immeds Added" contains the total number of directories with data extents that were
compressed into immediate directories.
Reporting on Extent Fragmentation
As files are created and removed over time, the free extent map for an allocation unit changes from having
one large free area to having many smaller free areas. This process is known as fragmentation. Also,
when files increase in size (particularly when growth occurs in small increments) small files can be allocated
in multiple extents. In the best case, each file that is not sparse would have exactly one extent (containing
the entire file), and the free-extent map is one continuous range of free blocks.
Conversely, in a case of extreme fragmentation, there can be free space in the file system, none of which
can be allocated. For example, on Version 2 disk layouts, the indirect-address extent size is always 8K long.
Section 1M248 4 HP-UX Release 11i: December 2000
___
___