HP-UX Reference (11i v1 05/09) - 1M System Administration Commands A-M (vol 3)
f
fsadm_vxfs(1M) fsadm_vxfs(1M)
large file exists on the file system.
NOTE: Large files are supported on HP-UX 10.20 systems and above. Be careful when
implementing large file system capability. System administration utilities such as
backup may not operate correctly if they are not large file aware.
-p passes Maximum number of passes to run. The default is 5 passes. Reorganizations are pro-
cessed until reorganization is complete, or the specified number of passes are run.
-r rawdev Pathname of raw device to read to determine file layout and fragmentation. This option
can be used when fsadm cannot determine the raw device.
-s Print a summary of activity at the end of each pass.
-t time Maximum time to run. Reorganizations are processed until reorganization is complete,
or the time limit has expired. time is specified in seconds.
-V Echo the completed command line, but do not execute the command. The command line
is generated by incorporating the user-specified options. This option allows the user to
verify the command line.
-v Specify verbose mode. Report reorganization activity.
If no options are specified, fsadm prints the current largefiles flag setting, then exits. The
-b, -o
largefiles
, and -o nolargefiles options cannot be specified if any other options are given. If
both -e and -d are specified, fsadm first completes the directory reorganization, then does the extent
reorganization.
Largefiles Flag
Files larger than two gigabytes are called large files. The -o largefiles and -o nolargefiles
options change the largefiles flag, allowing or disallowing large files in the file system.
Large files can be created only on file systems with disk layout Version 3 or above. A file system with large
files cannot be mounted on an HP-UX system older than HP-UX 10.20. Many existing applications cannot
operate on large files.
Setting the flag with the -o largefiles option succeeds only if the file system has the Version 3 disk
layout or above. See vxupgrade(1M) for information on how to upgrade a file system from an older disk
layout to the current version. Clearing the flag with the -o nolargefiles option succeeds only if the
flag is set and there are no large files present on the file system. See mkfs_vxfs(1M) and mount_vxfs(1M)
for information on creating and mounting file systems with large files.
The
-o largefiles and -o nolargefiles options are the only fsadm options that can be used
on an unmounted file system. An unmounted file system can be specified by invoking
fsadm with a spe-
cial device rather than a mount point. If an unmounted file system is specified, it must be clean.
Changing the
largefiles flag may require changes to /etc/fstab . For example, if fsadm
is used
to set the
largefiles flag, but nolargefiles is specified as a mount option in
/etc/fstab , the
files system is not mountable.
Defragmentation
For optimal performance, the kernel-extent allocator must be able to find large extents when it wants
them. To maintain file-system performance, run
fsadm periodically against all VxFS file systems to
reduce fragmentation. The frequency depends on file system usage and activity patterns, and the impor-
tance of performance; typically between once a day and once a month against each file system. The -v
option can be used to examine the amount of work performed by fsadm. You can adjust the frequency of
reorganization based on the rate of file system fragmentation.
There are two options that are available to control the amount of work done by fsadm. The -t option
specifies a maximum length of time to run. The -p option specifies a maximum number of passes to run.
If both are specified, fsadm exits if either of the terminating conditions is reached. By default, fsadm
runs 5 passes. If both the -e and -d options are specified, fsadm runs all the directory reorganization
passes before any extent reorganization passes.
fsadm uses the file .fsadm in the lost+found directory as a lock file. When fsadm is invoked, it
opens the file lost+found/.fsadm in the root of the file system specified by mount_point. If the file
does not exist, it is created. The fcntl(2) system call obtains a write lock on the file. If the write lock fails,
fsadm assumes that another instance of fsadm is running and fails. fsadm reports the process ID of the
process holding the write lock on the .fsadm file.
HP-UX 11i Version 1: September 2005 − 2 − Hewlett-Packard Company Section 1M−−251