.TH mmdefragfs 02/16/06 mmdefragfs Command .SH "Name" .PP \fBmmdefragfs\fR - Reduces disk fragmentation by increasing the number of full free blocks available to the file system. .SH "Synopsis" .PP \fBmmdefragfs\fR \fIDevice\fR [\fB-i\fR] [\fB-v\fR] [\fB-u\fR \fIBlkUtilPct\fR] .SH "Description" .PP Use the \fBmmdefragfs\fR command to reduce fragmentation of a file system. The \fBmmdefragfs\fR 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. .PP The \fBmmdefragfs\fR 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. .PP If \fBmmdefragfs\fR is issued on a file that is locked by SANergy, the file is not de-fragmented. .SH "Parameters" .PP .RS +3 \fB\fIDevice\fR \fR .RE .RS +9 The device name of the file system to have fragmentation reduced. File system names need not be fully-qualified. \fBfs0\fR is as acceptable as \fB/dev/fs0\fR. .PP This must be the first parameter. .RE .SH "Options" .PP .RS +3 \fB-i \fR .RE .RS +9 Specifies to query the current disk fragmentation state of the file system. Does not perform the actual defragmentation of the disks in the file system. .RE .PP .RS +3 \fB-u \fIBlkUtilPct\fR \fR .RE .RS +9 The average block utilization goal for the disks in the file system. The \fBmmdefragfs\fR command reduces the number of allocated blocks by increasing the percent utilization of the remaining blocks. The command automatically goes through multiple iterations until \fIBlkUtilPct\fR is achieved on all of the disks in the file system or until no progress is made in achieving \fIBlkUtilPct\fR from one iteration to the next, at which point it exits. .RE .PP .RS +3 \fB-v \fR .RE .RS +9 Specifies that the output is verbose. .RE .SH "Exit status" .PP .PP .RS +3 \fB0 \fR .RE .RS +9 Successful completion. .RE .PP .RS +3 \fBnonzero \fR .RE .RS +9 A failure has occurred. .RE .SH "Security" .PP You must have root authority to run the \fBmmdefragfs\fR command. .PP You may issue the \fBmmdefragfs\fR command from any node in the GPFS cluster. .PP When using the \fBrcp\fR and \fBrsh\fR commands for remote communication, a properly configured \fB.rhosts\fR file must exist in the root user's home directory on each node in the GPFS cluster. If you have designated the use of a different remote communication program on the \fBmmcrcluster\fR or the \fBmmchcluster\fR command, you must ensure: .RS +3 .HP 3 1. Proper authorization is granted to all nodes in the GPFS cluster. .HP 3 2. The nodes in the GPFS cluster can communicate without the use of a password, and without any extraneous messages. .RE .SH "Examples" .RS +3 .HP 3 1. To query the fragmentation state of file system \fBfs0\fR, issue this command: .sp .nf mmdefragfs fs0 -i .fi .sp .sp The system displays information similar to: .sp .nf free subblk free\ disk disk size in full subblk in % % name in nSubblk blocks fragments free blk blk util --------------- --------- --------- --------- -------- ------- gpfs68nsd 4390912 4270112 551 97.249 99.544 gpfs69nsd 4390912 4271360 490 97.277 99.590 --------- --------- --------- ------- (total) 8781824 8541472 1041 99.567 .fi .sp .HP 3 2. To reduce fragmentation of the file system \fBfs0\fR on all defined, accessible disks that are not stopped or suspended, issue this command: .sp .nf mmdefragfs fs0\ .fi .sp .sp The system displays information similar to: .sp .nf free subblk free disk in full subblk in % % name blocks blk framents free blk blk util before after freed before after before after before after ---------- ------------------------ ------------- ------------ ------------ gpfs57nsd 28896 29888 31 1462 463 50.39 52.12 94.86 98.31 gpfs60nsd 41728 43200 46 1834 362 59.49 61.59 93.55 98.66 --------------------- -------------- ----------- (total) 70624 73088 77 3296 825 93.63 98.84 .fi .sp .HP 3 3. To reduce fragmentation of all files in the file system \fBfs1\fR until the disks have an average block utilization percentage higher then 99%, issue this command: .sp .nf mmdefragfs fs1 -u 99\ .fi .sp .sp The system displays information similar to: .sp .nf 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 gpfs57nsd gpfs60nsd 6 % complete 12 % complete 32 % complete 38 % complete 43 % complete 75 % complete 81 % 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\ ---------- ------------------------ -------------- ------------ ------------ gpfs57nsd 39424 40064 20 1347 589 68.75 69.87 92.48 96.59 gpfs60nsd 50688 51456 24 1555 593 72.26 73.36 92.01 96.83\ --------------------- -------------- ------------ (total) 90112 91520 44 2902 1182 93.63 98.84 .fi .sp .RE .SH "See also" .PP mmdf Command .SH "Location" .PP \fB/usr/lpp/mmfs/bin\fR .PP