Differences between revisions 1 and 19 (spanning 18 versions)
Revision 1 as of 2009-05-16 09:50:07
Size: 3001
Editor: FranklinPiat
Comment: Initial page
Revision 19 as of 2019-12-14 01:56:37
Size: 4376
Editor: PaulWise
Comment: linkify manual pages
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
##||<tablestyle="width: 100%;" style="border: 0px hidden">~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: none-~||<style="text-align: right;border: 0px hidden"> (!) [[/Discussion|Discussion]]|| ~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[it/Ext4|Italiano]]-~
Line 4: Line 4:
[[FileSystem]] > Ext4
Line 6: Line 5:
~+Ext4+~ is an improved filesystem for Linux, introduced in kernel 2.6.28. Previous kernels had development implementation (i.e experimental). For more information
<<TableOfContents(2)>>

~+Ext4+~ is an improved FileSystem for Linux, introduced in kernel 2.6.28. Previous kernels had development implementation (i.e. experimental). For more information about Ext4, follow the links in the [[#see-also|See Also]] section.
Line 9: Line 11:
 * Debian stable releases don't support Ext4 (i.e [[DebianLenny|Lenny]] earlier).  * As of Jessie Ext4 is the default file system of Debian
* Old Debian releases don't support Ext4 (i.e. [[DebianLenny|Lenny]] and earlier).
Line 13: Line 16:
## If your page gets really long, uncomment this Table of Contents
## <<TableOfContents(2)>>
## If your page gets really long, uncomment this Table of Contents

== Things you need to know ==

ext4 is a [[https://en.wikipedia.org/wiki/Journaling_file_system|journaling]] file system, meaning it maintains a journal of operations not yet committed to disk, and is able to prevent some amount of data loss after a system crash or power failure. If an ext4 filesystem is determined "unclean" on boot (traces of remaining operations in the journal), the system will run {{{fsck}}} and attempt to repair the filesystem, and write uncommited blocks to the {{{lost+found/}}} directory. At the very least, the filesystem will be restored to a working state.

=== File system check with fsck.ext4 ===
## How to force a fsck on reboot ===
As of systemd the old 'touch /forcefsck ' no longer works instead you have to edit /etc/default/grub and add a "fsck.mode=force" to your kernel command line (you may have other bits - just add it between the quote marks)
{{{
GRUB_CMDLINE_LINUX="fsck.mode=force"
}}}
Then do an update-grub and reboot.

Afterward remove the fsck bit and update-grub again.

(This really needs to be made easier -- worth a bug report.)


==== De-fragmenting ====
{{{
$ e4defrag /dev/sd?
}}}
Line 17: Line 42:

=== Ext4 in stretch, jessie, Squeeze, testing and Unstable ===
  * Ext4 is currently in Debian Installer as the default.
Line 19: Line 48:
 * It isn't decided yet whether [[LennyAndAHalf]] will include {{{ext4}}}.

=== Ext4 in Etch ===
 * Debian [[DebianEtch|Etch]] doesn't support Ext4. (neither kernel 2.6.18 nor EtchAndAHalf's 2.6.24)

=== Ext4 in Squeeze and Unstable ===
 * Upstream kernels since 2.6.28 (which has a serious [[http://lwn.net/Articles/326708/|resize bug]]) officially supports Ext4 in production environments.
 * Ext4 is currently a Debian``Installer's [[DebianInstaller/SqueezeGoals|internal Squeeze release goal]] (i.e work in progress).
 * '''Bugs''' related to {{{ext4}}} in Debian: [[http://www.google.com/search?q=site%3Abugs.debian.org%2Fcgi-bin+ext4+-"Fixed+in%3A"|list of bugs]].
 * The [[https://ext4.wiki.kernel.org/articles/e/x/t/Ext4_Howto_d00b.html#For_people_who_are_running_Debian|ext4 wiki Debian entry]] says in reference to Lenny '' 'you should mount ext4dev filesystems using -o nodelalloc and only use freshly created filesystems using "mke2fs -t ext4dev"' ''. Making ext4dev appears to set the test_fs flag, but the nodelalloc option doesn't work: EXT4-fs: Unrecognized mount option "nodelalloc" or missing value.
Line 31: Line 52:
 How to mount and Ext4 filesystem under Lenny :: Lenny doesn't really/officially supports Ext4 (because it's experimental). Still ou can try to mount the Ext4 filesystems in read-only mode... and see what you see ! ({{{mount -t ext4dev -o ro /dev/XXX /mnt/ZZZ}}}).
 How to convert Ext3 to Ext4 :: See [[http://ext4.wiki.kernel.org/index.php/Ext4_Howto#Converting_an_ext3_filesystem_to_ext4|http://ext4.wiki.kernel.org/index.php/Ext4_Howto]]
 How to mount an Ext4 filesystem under Lenny :: Lenny doesn't really/officially support Ext4 (because it's experimental in its kernel version). Still, you can try to mount an Ext4 filesystem in read-only mode... and see what you see ! {{{
tune2fs -E test_fs /dev/XXX
mount -t ext4dev -o ro /dev/XXX /mnt/ZZZ
}}}
 How to convert Ext3 to Ext4 :: See the [[https://ext4.wiki.kernel.org/index.php/Ext4_Howto#Converting_an_ext3_filesystem_to_ext4|Ext4 HOWTO]] on the Ext4 Wiki of kernel.org.
Line 40: Line 64:
  * Manpages: {{{mkfs.ext4(8)}}} (or {{{mkfs.ext4dev(8)}}}), {{{tune2fs(8}}} and {{{resize2fs(8)}}}.
 * Linux's Ext4 HowTo ~-<<BR>> [[http://ext4.wiki.kernel.org/index.php/Ext4_Howto]] -~
  * Manual pages: [[DebianMan:8/mkfs.ext4|mkfs.ext4(8)]] (or [[DebianMan:8/mkfs.ext4dev|mkfs.ext4dev(8)]]), [[DebianMan:8/tune2fs|tune2fs(8)]] and [[DebianMan:8/resize2fs|resize2fs(8)]].
 * Linux's Ext4 HowTo ~-<<BR>> [[https://ext4.wiki.kernel.org/index.php/Ext4_Howto]] -~
Line 45: Line 69:
 * IRC: [[irc://irc.oftc.net/linuxfs|#linuxfs]] - [[irc://irc.oftc.net/ext4 |#ext4 ]]
  * https://ext4.wiki.kernel.org/index.php/IRC
Line 47: Line 73:
CategoryKernel
CategoryKernel | CategoryFileSystem | CategorySystemAdministration

Translation(s): English - Italiano


Ext4 is an improved FileSystem for Linux, introduced in kernel 2.6.28. Previous kernels had development implementation (i.e. experimental). For more information about Ext4, follow the links in the See Also section.

Compatibility:

  • As of Jessie Ext4 is the default file system of Debian
  • Old Debian releases don't support Ext4 (i.e. Lenny and earlier).

  • Ext3 filesystems can be upgraded to Ext4 (but not the other way around).
  • It is not possible to mount Ext4 with Ext3 (with some exception. read this article).

Things you need to know

ext4 is a journaling file system, meaning it maintains a journal of operations not yet committed to disk, and is able to prevent some amount of data loss after a system crash or power failure. If an ext4 filesystem is determined "unclean" on boot (traces of remaining operations in the journal), the system will run fsck and attempt to repair the filesystem, and write uncommited blocks to the lost+found/ directory. At the very least, the filesystem will be restored to a working state.

File system check with fsck.ext4

As of systemd the old 'touch /forcefsck ' no longer works instead you have to edit /etc/default/grub and add a "fsck.mode=force" to your kernel command line (you may have other bits - just add it between the quote marks)

GRUB_CMDLINE_LINUX="fsck.mode=force"

Then do an update-grub and reboot.

Afterward remove the fsck bit and update-grub again.

(This really needs to be made easier -- worth a bug report.)

De-fragmenting

$ e4defrag /dev/sd?

Status

Ext4 in stretch, jessie, Squeeze, testing and Unstable

  • Ext4 is currently in Debian Installer as the default.

Ext4 in Lenny

  • Debian Lenny doesn't support Ext4 (kernel 2.6.26) because it was still an experimental feature during the development of Lenny. Still, Lenny's 2.6.26 kernel provides the development module ext4dev. (see the FAQ)

  • The ext4 wiki Debian entry says in reference to Lenny 'you should mount ext4dev filesystems using -o nodelalloc and only use freshly created filesystems using "mke2fs -t ext4dev"' . Making ext4dev appears to set the test_fs flag, but the nodelalloc option doesn't work: EXT4-fs: Unrecognized mount option "nodelalloc" or missing value.

FAQ

How to mount an Ext4 filesystem under Lenny

Lenny doesn't really/officially support Ext4 (because it's experimental in its kernel version). Still, you can try to mount an Ext4 filesystem in read-only mode... and see what you see !

tune2fs -E test_fs /dev/XXX
mount -t ext4dev -o ro /dev/XXX /mnt/ZZZ
How to convert Ext3 to Ext4

See the Ext4 HOWTO on the Ext4 Wiki of kernel.org.


See also


CategoryKernel | ?CategoryFileSystem | CategorySystemAdministration