ext3.txt 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. Ext3 Filesystem
  2. ===============
  3. ext3 was originally released in September 1999. Written by Stephen Tweedie
  4. for 2.2 branch, and ported to 2.4 kernels by Peter Braam, Andreas Dilger,
  5. Andrew Morton, Alexander Viro, Ted Ts'o and Stephen Tweedie.
  6. ext3 is ext2 filesystem enhanced with journalling capabilities.
  7. Options
  8. =======
  9. When mounting an ext3 filesystem, the following option are accepted:
  10. (*) == default
  11. jounal=update Update the ext3 file system's journal to the
  12. current format.
  13. journal=inum When a journal already exists, this option is
  14. ignored. Otherwise, it specifies the number of
  15. the inode which will represent the ext3 file
  16. system's journal file.
  17. noload Don't load the journal on mounting.
  18. data=journal All data are committed into the journal prior
  19. to being written into the main file system.
  20. data=ordered (*) All data are forced directly out to the main file
  21. system prior to its metadata being committed to
  22. the journal.
  23. data=writeback Data ordering is not preserved, data may be
  24. written into the main file system after its
  25. metadata has been committed to the journal.
  26. commit=nrsec (*) Ext3 can be told to sync all its data and metadata
  27. every 'nrsec' seconds. The default value is 5 seconds.
  28. This means that if you lose your power, you will lose,
  29. as much, the latest 5 seconds of work (your filesystem
  30. will not be damaged though, thanks to journaling). This
  31. default value (or any low value) will hurt performance,
  32. but it's good for data-safety. Setting it to 0 will
  33. have the same effect than leaving the default 5 sec.
  34. Setting it to very large values will improve
  35. performance.
  36. barrier=1 This enables/disables barriers. barrier=0 disables it,
  37. barrier=1 enables it.
  38. orlov (*) This enables the new Orlov block allocator. It's enabled
  39. by default.
  40. oldalloc This disables the Orlov block allocator and enables the
  41. old block allocator. Orlov should have better performance,
  42. we'd like to get some feedback if it's the contrary for
  43. you.
  44. user_xattr (*) Enables POSIX Extended Attributes. It's enabled by
  45. default, however you need to confifure its support
  46. (CONFIG_EXT3_FS_XATTR). This is neccesary if you want
  47. to use POSIX Acces Control Lists support. You can visit
  48. http://acl.bestbits.at to know more about POSIX Extended
  49. attributes.
  50. nouser_xattr Disables POSIX Extended Attributes.
  51. acl (*) Enables POSIX Access Control Lists support. This is
  52. enabled by default, however you need to configure
  53. its support (CONFIG_EXT3_FS_POSIX_ACL). If you want
  54. to know more about ACLs visit http://acl.bestbits.at
  55. noacl This option disables POSIX Access Control List support.
  56. reservation
  57. noreservation
  58. resize=
  59. bsddf (*) Make 'df' act like BSD.
  60. minixdf Make 'df' act like Minix.
  61. check=none Don't do extra checking of bitmaps on mount.
  62. nocheck
  63. debug Extra debugging information is sent to syslog.
  64. errors=remount-ro(*) Remount the filesystem read-only on an error.
  65. errors=continue Keep going on a filesystem error.
  66. errors=panic Panic and halt the machine if an error occurs.
  67. grpid Give objects the same group ID as their creator.
  68. bsdgroups
  69. nogrpid (*) New objects have the group ID of their creator.
  70. sysvgroups
  71. resgid=n The group ID which may use the reserved blocks.
  72. resuid=n The user ID which may use the reserved blocks.
  73. sb=n Use alternate superblock at this location.
  74. quota Quota options are currently silently ignored.
  75. noquota (see fs/ext3/super.c, line 594)
  76. grpquota
  77. usrquota
  78. Specification
  79. =============
  80. ext3 shares all disk implementation with ext2 filesystem, and add
  81. transactions capabilities to ext2. Journaling is done by the
  82. Journaling block device layer.
  83. Journaling Block Device layer
  84. -----------------------------
  85. The Journaling Block Device layer (JBD) isn't ext3 specific. It was
  86. design to add journaling capabilities on a block device. The ext3
  87. filesystem code will inform the JBD of modifications it is performing
  88. (Call a transaction). the journal support the transactions start and
  89. stop, and in case of crash, the journal can replayed the transactions
  90. to put the partition on a consistent state fastly.
  91. handles represent a single atomic update to a filesystem. JBD can
  92. handle external journal on a block device.
  93. Data Mode
  94. ---------
  95. There's 3 different data modes:
  96. * writeback mode
  97. In data=writeback mode, ext3 does not journal data at all. This mode
  98. provides a similar level of journaling as XFS, JFS, and ReiserFS in its
  99. default mode - metadata journaling. A crash+recovery can cause
  100. incorrect data to appear in files which were written shortly before the
  101. crash. This mode will typically provide the best ext3 performance.
  102. * ordered mode
  103. In data=ordered mode, ext3 only officially journals metadata, but it
  104. logically groups metadata and data blocks into a single unit called a
  105. transaction. When it's time to write the new metadata out to disk, the
  106. associated data blocks are written first. In general, this mode
  107. perform slightly slower than writeback but significantly faster than
  108. journal mode.
  109. * journal mode
  110. data=journal mode provides full data and metadata journaling. All new
  111. data is written to the journal first, and then to its final location.
  112. In the event of a crash, the journal can be replayed, bringing both
  113. data and metadata into a consistent state. This mode is the slowest
  114. except when data needs to be read from and written to disk at the same
  115. time where it outperform all others mode.
  116. Compatibility
  117. -------------
  118. Ext2 partitions can be easily convert to ext3, with `tune2fs -j <dev>`.
  119. Ext3 is fully compatible with Ext2. Ext3 partitions can easily be
  120. mounted as Ext2.
  121. External Tools
  122. ==============
  123. see manual pages to know more.
  124. tune2fs: create a ext3 journal on a ext2 partition with the -j flags
  125. mke2fs: create a ext3 partition with the -j flags
  126. debugfs: ext2 and ext3 file system debugger
  127. References
  128. ==========
  129. kernel source: file:/usr/src/linux/fs/ext3
  130. file:/usr/src/linux/fs/jbd
  131. programs: http://e2fsprogs.sourceforge.net
  132. useful link:
  133. http://www.zip.com.au/~akpm/linux/ext3/ext3-usage.html
  134. http://www-106.ibm.com/developerworks/linux/library/l-fs7/
  135. http://www-106.ibm.com/developerworks/linux/library/l-fs8/