Difference between revisions of "Ext4"

From wikieduonline
Jump to navigation Jump to search
 
(31 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[wikipedia:ext4|ext4]] journaling [[File system|file system]] or fourth extended filesystem is a [[journaling file system]] for [[Linux]] and it is the default file system for many Linux distributions such as [[Ubuntu]] and [[Debian]]. [[Red Hat Enterprise Linux|RHEL]] default fs is [[XFS]].
+
{{lc}}
 +
[[wikipedia:ext4|ext4]] ([[2008]]) [[journaling]] [[File system|file system]] or fourth extended filesystem is a [[journaling file system]] for [[Linux]] and it is the default file system for many Linux distributions such as [[Ubuntu]] and [[Debian]]. [[Red Hat Enterprise Linux|RHEL]] default fs is [[XFS]].
  
Since [[Linux kernel]] 4.1 on June 2015<ref>https://lwn.net/Articles/639427/</ref>, ext4 natively supports file [[cryptography|encryption]]
+
Since [[Linux kernel]] [[4.1]] on June 2015<ref>https://lwn.net/Articles/639427/</ref>, ext4 natively supports file [[cryptography|encryption]]
 +
 
 +
* https://man7.org/linux/man-pages/man5/ext4.5.html
  
 
==Basic commands==
 
==Basic commands==
*[[mkfs]] and [[mke2fs]]
+
* <code>[[mkfs]]</code> and <code>[[mke2fs]]</code>
 
* Creating an ext4 filesystem: (by default since 2010 will do a quick and lazy initialization <ref>https://en.wikipedia.org/wiki/Ext4#Features</ref>)
 
* Creating an ext4 filesystem: (by default since 2010 will do a quick and lazy initialization <ref>https://en.wikipedia.org/wiki/Ext4#Features</ref>)
 
:Creating an ext4 in a disk
 
:Creating an ext4 in a disk
:: <code>[[mkfs.ext4]] /dev/sdX</code>  
+
:: <code>[[mkfs.ext4]] [[/dev/sd]]X</code>  
 
:Creating an ext4 FS in an [[Linux Administration/Devices and Filesystems/LVM|LV]]:
 
:Creating an ext4 FS in an [[Linux Administration/Devices and Filesystems/LVM|LV]]:
 
:: <code>mkfs.ext4 /dev/vg01/lv01</code>  
 
:: <code>mkfs.ext4 /dev/vg01/lv01</code>  
Line 14: Line 17:
  
 
=== resize2fs ===
 
=== resize2fs ===
[[resize2fs]]<ref>https://manpages.debian.org/stretch/e2fsprogs/resize2fs.8.en.html</ref> file system resizer  for ext2/ext3/[[ext4]] (<code>resize2fs /dev/mapper/VolGroup-lv_root</code>). Online resize (expand) is supported in resize2fs since 2006<ref>https://github.com/tytso/e2fsprogs/commit/bf69235ad0073c80386b70caba0e1b58e5f85697</ref>.<ref>https://www.technomenace.com/2014/08/how-to-extend-lvm-on-qcow2-images/</ref>. resize2fs code: https://github.com/tytso/e2fsprogs/blob/master/resize/resize2fs.c. See also: [[ext2online]]
+
<code>[[resize2fs]]</code><ref>https://manpages.debian.org/stretch/e2fsprogs/resize2fs.8.en.html</ref> file system resizer  for ext2/ext3/[[ext4]] (<code>resize2fs /dev/mapper/VolGroup-lv_root</code>). Online resize (expand) is supported in resize2fs since 2006<ref>https://github.com/tytso/e2fsprogs/commit/bf69235ad0073c80386b70caba0e1b58e5f85697</ref>.<ref>https://www.technomenace.com/2014/08/how-to-extend-lvm-on-qcow2-images/</ref>. resize2fs code: https://github.com/tytso/e2fsprogs/blob/master/resize/resize2fs.c. See also: [[ext2online]]
  
==EXT4 Features timeline==
+
== ext4 features timeline==
* 2015 File encryption
+
* 2020 ext4 [[fast commit]] support ([[Linux Kernel 5.10]] December 2020)
 +
* [[2015]] [[File encryption]]
 
* 2010 Lazy Initialization<ref>https://en.wikipedia.org/wiki/Ext4#Features</ref>
 
* 2010 Lazy Initialization<ref>https://en.wikipedia.org/wiki/Ext4#Features</ref>
 
* 2006 Online [[resize]] (expand) support
 
* 2006 Online [[resize]] (expand) support
 +
* 2006 [[Extents]] replace the traditional block mapping scheme used by <code>[[ext2]]</code> and <code>[[ext3]]</code>
  
 
== Activities ==
 
== Activities ==
Line 29: Line 34:
 
# Configure an [[Linux Administration/Devices and Filesystems/LVM|LVM]] Volume with an ext4 filesystem: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/high_availability_add-on_administration/s1-lvmsetupnfs-haaa
 
# Configure an [[Linux Administration/Devices and Filesystems/LVM|LVM]] Volume with an ext4 filesystem: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/high_availability_add-on_administration/s1-lvmsetupnfs-haaa
 
# Learn about Lazy initialization feature of ext4: https://www.thomas-krenn.com/en/wiki/Ext4_Filesystem#Lazy_Initialization
 
# Learn about Lazy initialization feature of ext4: https://www.thomas-krenn.com/en/wiki/Ext4_Filesystem#Lazy_Initialization
 +
# [[Review ext4 journalctl logs]]
 +
 +
== [[Mount options]] ==
 +
 +
== Related terms ==
 +
* <code>[[e2label]]</code>
 +
* [[XFS]]
 +
* [[Reservation percentage]]
  
 
== See also ==
 
== See also ==
 
* {{ext4}}
 
* {{ext4}}
 +
* {{filesystems}}
 
* {{fs}}
 
* {{fs}}
 +
* {{Linux filesystem commands}}
 
* [[ZFS]], [[LVM]], [[mdadm]], [[fdisk]] and [[partitions]]
 
* [[ZFS]], [[LVM]], [[mdadm]], [[fdisk]] and [[partitions]]
* [[XFS]] default filesystem for [[Red Hat Enterprise Linux|RHEL]] 7.0 in 2014.
+
* {{XFS}}
* [[tune2fs]] which allows among other actions to modify reserved space<ref>https://help.ubuntu.com/community/InstallingANewHardDrive</ref>
 
 
* [[ext2online]]
 
* [[ext2online]]
* [[JFS2]], [[mkfs]].jfs (Linux), [[jfsutils]] and [[xfs_growfs]] <ref>https://linux.die.net/man/8/xfs_growfs</ref>
+
* {{JFS2}}
* [[chfs]] ([[AIX]])
 
 
* {{mount}}
 
* {{mount}}
* [[chmod]], [[setuid]] and [[setgid]]
+
* {{Linux Commands privileges}}
 
* <code>[[smartctl]]</code>
 
* <code>[[smartctl]]</code>
  

Latest revision as of 10:46, 15 February 2023

ext4 (2008) journaling file system or fourth extended filesystem is a journaling file system for Linux and it is the default file system for many Linux distributions such as Ubuntu and Debian. RHEL default fs is XFS.

Since Linux kernel 4.1 on June 2015[1], ext4 natively supports file encryption

Basic commands[edit]

  • mkfs and mke2fs
  • Creating an ext4 filesystem: (by default since 2010 will do a quick and lazy initialization [2])
Creating an ext4 in a disk
mkfs.ext4 /dev/sdX
Creating an ext4 FS in an LV:
mkfs.ext4 /dev/vg01/lv01
To prevent lazy initialization mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/mapper/fc-root[3]

resize2fs[edit]

resize2fs[4] file system resizer for ext2/ext3/ext4 (resize2fs /dev/mapper/VolGroup-lv_root). Online resize (expand) is supported in resize2fs since 2006[5].[6]. resize2fs code: https://github.com/tytso/e2fsprogs/blob/master/resize/resize2fs.c. See also: ext2online

ext4 features timeline[edit]

Activities[edit]

Basic

  1. Create an file ext4 system using: mkfs.ext4
  2. Create an ext4 file system an mount it using systemd: https://codingbee.net/rhcsa/rhcsa-mount-filesystems-during-boot-time-using-systemd

Advanced

  1. Configure an LVM Volume with an ext4 filesystem: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/high_availability_add-on_administration/s1-lvmsetupnfs-haaa
  2. Learn about Lazy initialization feature of ext4: https://www.thomas-krenn.com/en/wiki/Ext4_Filesystem#Lazy_Initialization
  3. Review ext4 journalctl logs

Mount options[edit]

Related terms[edit]

See also[edit]

  • https://lwn.net/Articles/639427/
  • https://en.wikipedia.org/wiki/Ext4#Features
  • https://www.thomas-krenn.com/en/wiki/Ext4_Filesystem#Lazy_Initialization
  • https://manpages.debian.org/stretch/e2fsprogs/resize2fs.8.en.html
  • https://github.com/tytso/e2fsprogs/commit/bf69235ad0073c80386b70caba0e1b58e5f85697
  • https://www.technomenace.com/2014/08/how-to-extend-lvm-on-qcow2-images/
  • https://en.wikipedia.org/wiki/Ext4#Features
  • https://linux.die.net/man/8/xfs_growfs
  • Advertising: