Recent Changes - Search:




Tuning ext3 filesystem Optimize using e2fsck Linux ext2 ext3

-f     Force checking even if the file system seems clean.

-D     Optimize directories in filesystem.  This option causes e2fsck to try to  opti�
              mize  all  directories,  either  by  reindexing them if the filesystem supports
              directory indexing,  or by sorting  and  compressing  directories  for  smaller
              directories, or for filesystems using traditional linear directories.
So  ...

e2fsck -D -f /dev/sda1

       e2fsck - check a Linux ext2/ext3 file system

       e2fsck   [   -pacnyrdfkvstDFSV  ]  [  -b  superblock  ]  [  -B  blocksize  ]  [  -l|-L
       bad_blocks_file ] [ -C fd ] [ -j external-journal ] [ -E extended_options ] device

       e2fsck is used to check a Linux second extended file  system  (ext2fs).   E2fsck  also
       supports ext2 filesystems containing a journal, which are also sometimes known as ext3
       filesystems, by first applying the journal to the filesystem  before  continuing  with
       normal  e2fsck processing.  After the journal has been applied, a filesystem will nor�
       mally be marked as clean.  Hence, for ext3 filesystems, e2fsck will normally  run  the
       journal and exit, unless its superblock indicates that further checking is required.

       device is the device file where the filesystem is stored (e.g.  /dev/hdc1).

       Note  that  in  general it is not safe to run e2fsck on mounted filesystems.  The only
       exception is if the -n option is specified, and -c, -l, or -L options are  not  speci�
       fied.    However,  even  if it is safe to do so, the results printed by e2fsck are not
       valid if the filesystem is mounted.   If e2fsck asks whether or not you should check a
       filesystem  which  is  mounted,  the  only correct answer is ��no��.  Only experts who
       really know what they are doing should consider answering this question in  any  other

       The exit code returned by e2fsck is the sum of the following conditions:
            0    - No errors
            1    - File system errors corrected
            2    - File system errors corrected, system should
                   be rebooted
            4    - File system errors left uncorrected
            8    - Operational error
            16   - Usage or syntax error
            32   - E2fsck canceled by user request
            128  - Shared library error

Edit - History - Print - Recent Changes - Search
Page last modified on April 12, 2009, at 12:43 PM