Defragmenting disks under Linux

Tommy Reynolds Tommy.Reynolds at MegaCoder.com
Tue Apr 6 22:25:40 UTC 2004


Uttered Michal Zeravik <michalz at olomouc.com>, spake thus:

> My boottime fsck shows about 3.4% of fragmented files on / ext3 partition.
> It's quite a lot, isn't it? Well, It's over an half year, but...
> Chris Jones wrote:
> >As a long-time user of various Windoze "distro's" (from win3.11 all the
> >way to Win2k), I have come to recognise that one needs to regularly
> >de-frag hard-disks under windoze. 
> >
> >My question is:-
> >Is linux susceptible to fragmentation?

Linux handles "fragmented" files just fine, thanks to the effort in
the kernel to properly handle disk caching.  By definition, blocks in 
Linux files are not contiguous on the disk.  However, EXT2/EXT3 does
make some attempts at leaving some extra free space at the end of a
file, just in case it later needs to be extended.

However, be aware that the "fragmentation" report you get with the
fsck(8) program isn't the type of fragmentation you may be thinking
of.  Under UNIX and/or Linux, this filesystem fragmentation refers to
the percentage of tiny files that were able to be stored in
partially-used disk block allocations for other files.

Cheers!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20040406/1105faad/attachment-0001.sig>


More information about the fedora-list mailing list