29.01.2013 Views

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

See the “mmdf Comm<strong>and</strong>” on page 165 for complete usage information.<br />

Querying <strong>and</strong> reducing file system fragmentation<br />

Disk fragmentation within a file system is an unavoidable condition. When a file is closed after it has been<br />

written to, the last logical block of data is reduced to the actual number of subblocks required, thus<br />

creating a fragmented block. In order to write to a file system, free full blocks of disk space are required.<br />

Due to fragmentation, it is entirely possible to have the situation where the file system is not full, but an<br />

insufficient number of free full blocks are available to write to the file system. Replication can also cause<br />

the copy of the fragment to be distributed among disks in different failure groups. The mmdefragfs<br />

comm<strong>and</strong> can be used to query the current fragmented state of the file system <strong>and</strong> reduce the<br />

fragmentation of the file system.<br />

In order to reduce the fragmentation of a file system, the mmdefragfs comm<strong>and</strong> migrates fragments to<br />

free space in another fragmented disk block of sufficient space, thus creating a free full block. There is no<br />

requirement to have a free full block in order to run the mmdefragfs comm<strong>and</strong>. The execution time of the<br />

mmdefragfs comm<strong>and</strong> depends on the size <strong>and</strong> allocation pattern of the file system. For a file system<br />

with a large number of disks, the mmdefragfs comm<strong>and</strong> will run through several iterations of its algorithm,<br />

each iteration compressing a different set of disks. Execution time is also dependent on how fragmented<br />

the file system is. The less fragmented a file system, the shorter time for the mmdefragfs comm<strong>and</strong> to<br />

execute.<br />

The fragmentation of a file system can be reduced on all disks which are not suspended or stopped. If a<br />

disk is suspended or stopped, the state of the disk, not the utilization information, will be displayed as<br />

output for the mmdefragfs comm<strong>and</strong>.<br />

The mmdefragfs comm<strong>and</strong> can be run on both a mounted or an unmounted file system, but achieves<br />

best results on an unmounted file system. Running the comm<strong>and</strong> on a mounted file system can cause<br />

conflicting allocation information <strong>and</strong> consequent retries to find a new free subblock of the correct size to<br />

store the fragment in.<br />

If the mmdefragfs comm<strong>and</strong> is issued on a file that is locked by SANergy, the file is not de-fragmented.<br />

Querying file system fragmentation<br />

To query the current status of the amount of fragmentation for a file system, specify the file system name<br />

along with the -i option on the mmdefragfs comm<strong>and</strong>. For example, to display the current fragmentation<br />

information for file system fs0, enter:<br />

mmdefragfs fs0 -i<br />

The system displays information similar to:<br />

"fs0" 10304 inodes: 457 allocated / 9847 free<br />

free subblk free<br />

disk disk size in full subblk in % %<br />

name in nSubblk blocks fragments free blk blk util<br />

--------------- --------- --------- --------- -------- -------<br />

gpfs68nsd 4390912 4270112 551 97.249 99.544<br />

gpfs69nsd 4390912 4271360 490 97.277 99.590<br />

--------- --------- --------- -------<br />

(total) 8781824 8541472 1041 99.567<br />

See the “mmdefragfs Comm<strong>and</strong>” on page 146 for complete usage information.<br />

22 <strong>GPFS</strong>: <strong>Administration</strong> <strong>and</strong> <strong>Programming</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!