Reorganizing a file system

You can reorganize or compact a fragmented file system using fsadm, even while the file system is mounted. This may help shrink a file system that could not previously be decreased.

To reorganize a VxFS file system

vxfs

The file system type.

-d

Reorders directory entries to put subdirectory entries first, then all other entries in decreasing order of time of last access. Also compacts directories to remove free space.

-D

Reports on directory fragmentation.

-e

Minimizes file system fragmentation. Files are reorganized to have the minimum number of extents.

-E

Reports on extent fragmentation.

-H

Displays the storage size in human-friendly units (KB/MB/GB/TB/PB/EB), when used with the -E and -D options.

mount_point

The file system's mount point.

-r rawdev

Specifies the path name of the raw device if there is no entry in /etc/fstab and fsadm cannot determine the raw device.

To perform free space defragmentation

vxfs

The file system type.

-C

Minimizes file system free space fragmentation. This attempts to generate bigger chunks of free space in the device.

mount_point

The file system's mount point.

The following example reorganizes the file system mounted at /mnt1.

Example of reorganizing a VxFS file system

The following example minimizes the free space fragmentation of the file system mounted at /mnt1.

Example of running free space defragmentation