Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fsr(1M) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

crontab(1)

fsck(1M)

mkfs(1M)

ncheck(1M)

efs(4)

fsctl(7)



fsr(1M)                                                                fsr(1M)



NAME
     fsr - filesystem reorganizer for EFS

SYNOPSIS
     /usr/etc/fsr [-s] [-v] [-g] [-M] [-t seconds] [-f leftoff] [-m mtab]
     /usr/etc/fsr [-s] [-v] [-g] [-M] [efsdev | dir | file] ...

DESCRIPTION
     fsr is applicable only to EFS filesystems.

     fsr 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)
     while simultaneously compacting the filesystem free space.

     The following options are accepted by fsr.  The -m, -t, and -f options
     have no meaning if any filesystems, directories, 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 /usr/tmp/.fsrlast to read the state
                  of where to start and as the file to store the state of
                  where reorganization left off.

     -M           Reorganize only the metadata.

     -s           Print fragmentation statistics only.  The fragmentation
                  percentage reported is 100 divided by the average size of
                  contiguous storage in that category (%frag is file data,
                  %free is free space).  Different files are considered non-
                  contiguous.

     -v           Verbose.  Print cryptic information about each file being
                  reorganized.

     -g           Print all output using syslog(3C).  This is the default if
                  fsr is not invoked on a tty.  If fsr is invoked on a tty
                  then output is printed to the tty by default.

     The intended usage is to call fsr from crontab at a regular time -- the
     default is once per week.  When invoked with no arguments fsr reorganizes
     all regular files in all mounted filesystems.  fsr makes many cycles over
     /etc/mtab each time making a single pass over each filesystem.  A pass
     consists of three sub-passes, the first of which organizes the filesystem
     metadata (directories and indirect extents) to improve fsck performance,
     the second of which compacts files to improve performance, and the last
     of which de-fragments filesystem free space.  The first fsr pass in this



                                                                        Page 1





fsr(1M)                                                                fsr(1M)



     mode does only the first sub-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 /usr/tmp/.fsrlast.
     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 can be called with one or more arguments naming filesystems (block or
     character device name), directory hierarchies, and files to reorganize.
     In this mode fsr does not read or write /usr/tmp/.fsrlast nor does it run
     for a fixed time interval.  It makes one pass through each specified
     regular file, all regular files in each specified filesystem and all
     regular files in each specified directory hierarchy.  When descending a
     directory hierarchy fsr reorganizes each regular file before descending
     into subdirectories.  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 or directory hierarchy these types of files are silently
     skipped.

FILES
     /etc/mtab            contains default list of filesystems to reorganize.
     /usr/tmp/.fsrlast    records the state where reorganization left off.

SEE ALSO
     crontab(1), fsck(1M), mkfs(1M), ncheck(1M), efs(4), fsctl(7).

NOTES
     An entry in /etc/mtab or the file specified using the -m option must have
     the rw option specified, for example:

          /dev/root / efs rw 0 0

     If this option is not present, then fsr skips the filesystem described by
     that line.  If this option is not present, make sure that it is present
     in the corresponding line in /etc/fstab so that it will appear in
     /etc/mtab when the filesystem is mounted.  See the fstab(4) and mtab(4)
     reference pages for more details.

     fsr is a memory intensive program, and consumes memory proportional to
     the number of file and directory inodes in the largest filesystem in the
     system.  Running fsr on a filesystem with 500,000 inodes, for example,
     can require 40 to 50 megabytes of main memory.












                                                                        Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026