DEFRAG(8)

NAME
[e]defrag - defragment file systems.

SYNOPSIS
defrag | edefrag [ -Vdrsv ] [ -p pool-size ] /dev/name

DESCRIPTION
Defrag will reorganise data on a minix file system partition in order to improve the file system's performance. Edefrag is the equivalent program for the extended file system.

Note that unlike the fsck program, defrag MUST NOT be run on a mounted file system device (unless invoked with the -r (readonly) option, which is always safe). Also note that if you defragment a partition containing a bootable kernel image, you will have to reinstall the boot loader for that image (since the location on disk of the image may have changed).

Remember, if defrag fails for any reason (including power glitches, kernel bugs etc.), you will be left with a terminally sick file system, so backup any valuable data before you start.

OPTIONS

-V  Supply full version information. If you are sending bug reports, please include this information.

-d  Run in debugging mode. This will not be available if disabled at compile-time.

-r  Readonly mode. Defrag will scan the file system and simulate the job of defragmentation, but will not write to the file system. This can be used for debugging or testing. It may also be used to find out how much work defrag will have to do, in order to choose a sensible pool-size

-s  Summarise file system information and defrag performance statistics.

-v  Verbose - gives a progress report as defragmentation proceeds. If -v is given twice, then a more detailed report is supplied.

-p number
    Selects the number of (1KB) buffers allocated to the defragmenter's buffer pool. These buffers are used when relocating data, so the more buffers allocated, the more efficient the relocation process. The number you choose will depend on how much physical and virtual memory you have available.

BUGS
Maybe, but then that's why you backed up your data first, isn't it?

AUTHORS

Written by Stephen Tweedie. The initial version was based on the fsck / efsck programs by Linus Torvalds and Remy Card. Send bug reports, fixes, improvements, comments and fan-mail to sct@dcs.ed.ac.uk.