PRIMECLUSTER Global File Services Configuration and Administration Guide 4.2 (Solaris(TM) Operating Environment) |
Contents Index |
Appendix B Reference Manual | > B.2 Management Commands Specific to the GFS Local File System |
sfxdefrag [ -f ] [ -V | -S ] { special | mount-point } { simple | adjacent | evacuate | dircomp }
sfxdefrag [ -f ] [ -V | -S ] [ -h ] { special | mount-point } { simple | adjacent | evacuate | dircomp } file [ file [...]]
sfxdefrag [ -f ] [ -V | -S ] { special | mount-point } free
The sfxdefrag command uses the specified defragmentation policy to defragment the GFS Local File System specified using the block special file named special or the mount point mount-point of a representative partition.
sfxdefrag can defragment the specified file system while the file system is mounted (online) or unmounted (offline).
The defragmentation policies are as follows:
simple policy:
The extent allocation efficiency of a file is improved.
The area is allocated from large free extents and fragmentation is removed.
If sufficient large free extents are existed, defragmentation can be performed faster than the other policies (adjacent and evacuate).
adjacent policy:
The extent allocation efficiency of a file is improved.
The free extents following the extent to be defragmented are allocated and fragmentation is removed.
evacuate policy:
The extent allocation efficiency of a file is improved.
If the extents following the extent to be defragmented are used by other files, the extents are allocated after being forcibly moved and fragmentation is removed.
Although time is required to forcibly move the extents used, this policy offers ideal defragmentation.
free policy:
Large free extents are made out to the file system.
dircomp policy:
Unnecessary extents in the directory are deleted and the directory is compressed.
Only a super user can execute the sfxdefrag command.
The following options are supported:
-f
This option specifies offline defragmentation. An error will occur if this option is specified for an online file system. When this option is specified, the mount information must be registered to /etc/vfstab file beforehand.
-V
This option displays progress in detail.
-S
This option does not display progress.
-h
This option specifies that only the specified directory hierarchy is to be defragmented when a directory to be defragmented is specified.
If this option is not specified, all hierarchies under the specified directory will be defragmented.
The following operands can be specified:
special
Specify the block special file name of the representative partition of the target file system.
When the special operand and -f option are specified, specify the block special file name registered in the /etc/vfstab file.
mount-point
Specify the mount point of the target file system.
When the mount-point operand and -f option are specified, specify the mount point registered in the /etc/vfstab file.
file [ file [...]]
Specify the file or directory to be defragmented when simple, adjacent, or evacuate is specified as the defragmentation policy.
Use a relative path name for the root directory of the target file system for the file or directory.
The following exit states are returned:
0 Fragmentation terminated normally.
>0 An error occurred.
# sfxdefrag -f /sfxfs simple
# sfxdefrag /dev/sfdsk/gfs/dsk/vol1100 adjacent target_dir
# sfxdefrag /sfxfs evacuate target_file1 target_file2
# sfxdefrag /sfxfs free
# sfxdefrag -h /dev/sfdsk/gfs/dsk/vol1100 dircomp target_dir
/etc/mnttab
Specifies the block special file name or mount point in the file when defragmenting online.
/etc/vfstab
Specifies the block special file name or mount point in the file when defragmenting offline.
Contents Index |