how to defragment linux file system?
Amedee Van Gasse
amedee-ubuntu at amedee.be
Sat Mar 20 10:39:23 UTC 2010
On 20-03-10 09:27, Steve Lamb wrote:
> NoOp wrote:
>> A. It is not necessary to defrag an ext3 filesystem.
>
> It is *generally* not necessary to defrag an ext3 filesystem. However
> that advice was written before the advent of the wide scale use of bittorrents
> which, with their incremental and random updating of files, throws a huge
> amount of fragmentation on the filesystem. This isn't to say that torrents
> are the only issue. Running an ext3 system with a low amount of free space
> will also cause a high amount of fragmentation over time.
>
> The answer really is that ext3, under normal operation, does not need
> defragmentation but for a fraction of a time FAT or even NTFS do. It is
> normally not something the average user need concern themselves over and if
> there is ever a case of a file which might be highly fragmented (as in the
> case of a torrent) the solution is simple. Ensure you have a decent amount of
> space (which means a high chance of continuous space) and simply copy (not
> move) the file then delete the original. The copy operation will attempt to
> keep the file as unfragmented as possible.
>
> If anyone doubts the veracity of this advice consider the last 2 quoted
> lines from that page.
>
> > No true defragmenting tools exist for the ext3 file system, but tools
> > for defragmenting will be included with the ext4 file system.
>
> If ext3 didn't need defragging *ever* then why would the successor have a
> planned defragment tool? ;) Esp. in light of the use of extents over the
> traditional block map.
>
> Pedantic, I know, but I'm a stickler for accuracy. :D
>
Guess what the basic operation of those ext4 defrag tools will be. :-)
People have even hacked together some defrag tools for ext2/3. Guess how
they work. :)
More information about the ubuntu-users
mailing list