Veritas File System 4.1 Administrator's Guide (HP-UX 11i v3, February 2007)

VERITAS File System Quick Reference
Veritas File System Quick Reference
Appendix A 179
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.
Example A-8 To shrink a VxFS file system mounted at /ext to 20480 sectors
Enter:
# fsadm -F vxfs -b 20480 /ext
NOTE After this operation, there is unused space at the end of the device. You can then resize the
device, but be careful not to make the device smaller than the new size of the file system.
How to Reorganize a File System
You can reorganize (or compact) a fragmented file system using fsadm, even while the file system is
mounted. This may help shrink a file system that could not previously be decreased.
NOTE If a file system is full or busy, the reorg operation may fail.
To reorganize a VxFS file system, use the syntax:
fsadm [-F vxfs] [-e] [-d] [-E] [-D] [-r rawdev] mount_point
vxfs The file system type
-d Reorders directory entries to put subdirectory entries first, then all other entries in
decreasing order of time of last access. Also compacts directories to remove free space.
-D Reports on directory fragmentation.
-e Minimizes file system fragmentation. Files are reorganized to have the minimum
number of extents.
-E Reports on extent fragmentation.
mount_point The file system’s mount point.