Extent Fragmentation Report
Total Average Average Total
Files File Blks # Extents Free Blks
0 0 0 4175784
blocks used for indirects: 0
% Free blocks in extents smaller than 64 blks: 0.00
% Free blocks in extents smaller than 8 blks: 0.00
% blks allocated to extents 64 blks or larger: 0.00
Free Extents By Size
1: 0 2: 0 4: 2
8: 2 16: 1 32: 2
64: 1 128: 2 256: 2
512: 0 1024: 1 2048: 0
4096: 1 8192: 1 16384: 0
32768: 1 65536: 1 131072: 1
262144: 1 524288: 1 1048576: 1
2097152: 1 4194304: 0 8388608: 0
16777216: 0 33554432: 0 67108864: 0
134217728: 0 268435456: 0 536870912: 0
1073741824: 0 2147483648: 0^C2350465+0 records in
2350465+0 records out^C4858753+0 records in
4858753+0 records outwrite: No space left on device
1117841+0 records in
1117841+0 records outf1 812
f2 813
f3 814 Extent Fragmentation Report
Total Average Average Total
Files File Blks # Extents Free Blks
165 3163 2 117
blocks used for indirects: 2
% Free blocks in extents smaller than 64 blks: 100.00 <<<<
% Free blocks in extents smaller than 8 blks: 17.95 <<<<
% blks allocated to extents 64 blks or larger: 99.84 <<<<
Free Extents By Size
1: 5 2: 2 4: 3
8: 2 16: 3 32: 1
64: 0 128: 0 256: 0
512: 0 1024: 0 2048: 0
4096: 0 8192: 0 16384: 0
32768: 0 65536: 0 131072: 0
262144: 0 524288: 0 1048576: 0
2097152: 0 4194304: 0 8388608: 0
16777216: 0 33554432: 0 67108864: 0
134217728: 0 268435456: 0 536870912: 0
1073741824: 0 2147483648: 0Note: To see if the FS is fragmented, one or more of the following conditions should be met:
% Free blocks in extents smaller than 64 blks: 100.00 =>100/100 >.5 OR
% Free blocks in extents smaller than 8 blks: 17.95 =>17.95/100 >.05 OR
% blks allocated to extents 64 blks or larger: 99.84 =>99.84/1000 <.05An unfragmented file system has the following characteristics:
A badly fragmented file system has one or more of the following characteristics:
3. Now we are going to Defrag it:
# fsadm -F vxfs -de /datavol
We will check the defragmentation again:-
# fsadm -F vxfs -E /datavol
Extent Fragmentation Report
Total Average Average Total
Files File Blks # Extents Free Blks
167 2707 1 518
blocks used for indirects: 4
% Free blocks in extents smaller than 64 blks: 38.22 <<<<<
% Free blocks in extents smaller than 8 blks: 5.79 <<<<<
% blks allocated to extents 64 blks or larger: 99.95 <<<<<
Free Extents By Size
1: 4 2: 5 4: 4
8: 3 16: 3 32: 3
64: 1 128: 2 256: 0
512: 0 1024: 0 2048: 0
4096: 0 8192: 0 16384: 0
32768: 0 65536: 0 131072: 0
262144: 0 524288: 0 1048576: 0
2097152: 0 4194304: 0 8388608: 0
16777216: 0 33554432: 0 67108864: 0
134217728: 0 268435456: 0 536870912: 0
1073741824: 0 2147483648: 0
Note the specific lines starting "% Free blocks" in the - as you can see FS is defragmented.
Defragmentation:
During defragmentation fsadm reads the memory map from the mmap syscall and then tries to do the unmap of the memory by the munmap sys call. Once the unmapping is done it resyncs the file descriptor cache with the FS by using the fdsync routine. There is no physical movement of the data that takes place. To make sure that the newly organized space by fsadm is available to the next file allocation unit we need to do the following: