[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Commands Reference, Volume 2

defragfs Command

Purpose

Increases a file system's contiguous free space.

Syntax

defragfs [ -q | -r ] { Device | FileSystem }

Description

The defragfs command increases a file system's contiguous free space by reorganizing allocations to be contiguous rather than scattered across the disk. You can specify the file system to be defragmented with the Device variable, the path name of the logical volume (for example, /dev/hd4). You can also specify it with the FileSystem variable, which is the mount point in the /etc/filesystems file.

The defragfs command is intended for fragmented and compressed file systems. However, you can use the defragfs command to increase contiguous free space in nonfragmented file systems.

You must mount the file system read-write for this command to run successfully. Using the -q flag or the -r flag generates a fragmentation report. These flags do not alter the file system.

Flags

-q Reports the current state of the file system.
-r Reports the current state of the file system and the state that would result if the defragfs command is run without either -q or -r flag.

Examples

  1. To defragment the /data1 file system located on the /dev/lv00 logical volume, enter:
    defragfs /data1
  2. To defragment the /data1 file system by specifying its mount point, enter:
    defragfs /data1
  3. To generate a report on the /data1 file system that indicates its current status as well as its status after being defragmented, enter:
    defragfs -r /data1

Files

/etc/filesystems Lists the known file systems and defines their characteristics.

Related Information

The crfs command, the lsfs command, the mkfs command.

Understanding Data Compression, in the AIX Version 4.3 System Management Concepts: Operating System and Devices book.

Understanding Fragments and a Variable Number of i-nodes, in the AIX Version 4.3 System Management Concepts: Operating System and Devices book.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]