fsr_xfs(1M) fsr_xfs(1M)
fsr_xfs - filesystem reorganizer for XFS
/usr/etc/fsr_xfs [-v] [-t seconds] [-f leftoff] [-m mtab]
/usr/etc/fsr_xfs [-v] [xfsdev | file] ...
fsr_xfs is applicable only to XFS filesystems.
fsr_xfs improves the organization of mounted filesystems. The
reorganization algorithm operates on one file at a time, compacting or
otherwise improving the layout of the file extents (contiguous blocks of
file data).
The following options are accepted by fsr_xfs. The -m, -t, and -f
options have no meaning if any filesystems or files are specified on the
command line.
-m mtab Use this file for the list of filesystems to reorganize.
The default is to use /etc/mtab. This file must be in
mtab(4) format.
-t seconds How long to reorganize. The default is 7200 (2 hours).
-f leftoff Use this file instead of /var/tmp/.fsrlast to read the state
of where to start and as the file to store the state of
where reorganization left off.
-v Verbose. Print cryptic information about each file being
reorganized.
The intended usage is to regularly run the fsr command which in turn
invokes fsr_xfs when it encounters XFS filesystems. By default this is
done from crontab once per week.
When invoked with no arguments fsr_xfs reorganizes all regular files in
all mounted filesystems. fsr_xfs makes many cycles over /etc/mtab each
time making a single pass over each XFS filesystem. Each pass goes
through and selects files that have the largest number of extents. It
attempts to defragment the top 10% of these files on each pass.
It runs for up to two hours after which it records the filesystem where
it left off, so it can start there the next time. This information is
stored in the file /var/tmp/.fsrlast_xfs. If the information found here
is somehow inconsistent or out of date it is ignored and reorganization
starts at the beginning of the first filesystem found in /etc/mtab.
fsr_xfs can be called with one or more arguments naming filesystems
(block device name), and files to reorganize. In this mode fsr_xfs does
not read or write /var/tmp/.fsrlast_xfs nor does it run for a fixed time
interval. It makes one pass through each specified regular file and all
Page 1
fsr_xfs(1M) fsr_xfs(1M)
regular files in each specified filesystem. A command line name
referring to a symbolic link (except to a file system device), FIFO, or
UNIX domain socket generates a warning message, but is otherwise ignored.
While traversing the filesystem these types of files are silently
skipped.
/etc/mtab contains default list of filesystems to reorganize.
/var/tmp/.fsrlast_xfs
records the state where reorganization left off.
fsr(1M), mkfs_xfs(1M), mtab(4), xfs_ncheck(1M), xfs(4).
fsr_xfs improves the layout of extents for each file by copying the
entire file to a temporary location and then interchanging the data
extents of the target and temporary files in an atomic manner. This
method requires that enough free disk space be available to copy any
given file and that the space be less fragmented then the original file.
It also requires the owner of the file to have enough remaining filespace
quota to do the copy on systems running quotas. fsr_xfs generates a
warning message if space is not sufficient to improve the target file.
A temporary file used in improving a file given on the command line is
created in the same parent directory of the target file and is prefixed
by the string '.fsr'. The temporary files used in improving an entire XFS
device are stored in a directory at the root of the target device and use
the same naming scheme. The temporary files are unlinked upon creation
so data will not be readable by any other process.
fsr_xfs does not operate on files that are currently mapped in memory. A
'file busy' error can be seen for these files if the verbose flag (-v) is
set.
An entry in /etc/mtab or the file specified using the -m option must have
the rw option specified for read and write access. If this option is not
present, then fsr_xfs skips the filesystem described by that line. See
the fsta
reference pages for more details.
PPPPaaaaggggeeee 2222 [ Back ]
|