Name
mmdefragfs - Reduces disk fragmentation by increasing the number of full free blocks available to the file system.
Synopsis
mmdefragfs Device [-i] [ -v] [-u BlkUtilPct]
Description
Use the mmdefragfs command to reduce fragmentation of a file system. The mmdefragfs command moves existing file system data within a disk to make more efficient use of disk blocks. The data is migrated to unused subblocks in partially allocated blocks thereby increasing the number of free full blocks.
The mmdefragfs command can be run against a mounted or unmounted file system. However, best results are achieved when the file system is unmounted. When a file system is mounted, allocation status may change causing retries to find a suitable unused subblock.
Parameters
This must be the first parameter.
Options
Exit status
Security
You must have root authority to run the mmdefragfs command.
You may issue the mmdefragfs command from any node in the GPFS cluster.
In an SP environment:
For further information, see the latest IBM Parallel System Support Programs for AIX: Administration Guide, IBM Parallel System Support Programs for AIX: Command and Technical Reference, and RS/6000: Planning Volume 2, Control Workstation and Software Environment manuals at www.rs6000.ibm.com/resource/aix_resource/sp_books/pssp. Search for information on sysctl.
Examples
mmdefragfs fs0 -i
The system displays information similar to:
"fs0" 10304 inodes: 457 allocated / 9847 free
free subblk free
disk disk size in full subblk in % %
name in nSubblk blocks fragments free blk blk util
--------------- --------- --------- --------- -------- -------
gpfs68n1 4390912 4270112 551 97.249 99.544
gpfs69n1 4390912 4271360 490 97.277 99.590
--------- --------- --------- -------
(total) 8781824 8541472 1041 99.567
mmdefragfs fs0
The system displays information similar to:
WARNING: "fs0" is mounted on 4 nodes(s) and in use on 4 node(s)
free subblk free
disk in full subblk in % %
name blocks blk fragments free blk blk util
before after freed before after before after before after
--------------- ------------------------ ---------------- ------------ ------------
gpfs57n7 28896 29888 31 1462 463 50.39 52.12 94.86 98.31
gpfs60n8 41728 43200 46 1834 362 59.49 61.59 93.55 98.66
--------------------- ----------------
(total) 70624 73088 77 3296 825
mmdefragfs fs1 -u 99
The system displays information similar to:
WARNING: "fs1" is mounted on 1 nodes(s) and in use on 1 node(s)
Start processing: iteration 1
Processing Pass 1 of 1
Disk Name gpfs57n7 gpfs60n8
6 % complete
12 % complete
17 % complete
22 % complete
27 % complete
32 % complete
38 % complete
43 % complete
49 % complete
56 % complete
63 % complete
70 % complete
75 % complete
81 % complete
87 % complete
92 % complete
98 % complete
free subblk free
disk in full subblk in % %
name blocks blk fragments free blk blk util
before after freed before after before after before after
--------------- ------------------------ ---------------- ------------ ------------
gpfs57n7 39424 40064 20 1347 589 68.75 69.87 92.48 96.59
gpfs60n8 50688 51456 24 1555 593 72.26 73.36 92.01 96.83
--------------------- ----------------
(total) 90112 91520 44 2902 1182
See also
Location
/usr/lpp/mmfs/bin