Skip to main content
Added more background on benefit of sorting files physically on disk by their logical order.
Source Link
rjt
  • 426
  • 4
  • 7

e2fsck -D /dev/sda1 
optimizese2fsck -C 0 -c -c -D /dev/sda1

-D optimizes Directories by sorting and reindexing them which usually speeds things up. Might not be considered a full filesystem defrag, but not all systems have e4defrag.

Sorting directories so that directories and files are in alphabetical order speeds reading up because files are read together physically as well as logically.

I include the following options when running e2fsck. -C 0 outputs to stdout -c -c non-destructive rw test using badblocks

e2fsck -D /dev/sda1 optimizes Directories by sorting and reindexing them which usually speeds things up. Might not be considered a full filesystem defrag, but not all systems have e4defrag.

e2fsck -D /dev/sda1 
e2fsck -C 0 -c -c -D /dev/sda1

-D optimizes Directories by sorting and reindexing them which usually speeds things up. Might not be considered a full filesystem defrag, but not all systems have e4defrag.

Sorting directories so that directories and files are in alphabetical order speeds reading up because files are read together physically as well as logically.

I include the following options when running e2fsck. -C 0 outputs to stdout -c -c non-destructive rw test using badblocks

Source Link
rjt
  • 426
  • 4
  • 7

e2fsck -D /dev/sda1 optimizes Directories by sorting and reindexing them which usually speeds things up. Might not be considered a full filesystem defrag, but not all systems have e4defrag.