Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

ext4

Direct answer

ext4 is the long-standing default Linux filesystem: journaled, can grow online and shrink offline, with a fixed inode count set at creation and a 5 % root reserve by default.

When to use this

Use it for general-purpose filesystems, or when an ext4 filesystem needs resizing or repair.

First 30 seconds

1. tune2fs -l /dev/<dev> | grep -E 'state|Inode count|Reserved'.

2. Errors? dmesg | grep EXT4.

3. Grow: resize2fs /dev/<dev> after the device grows.

4. Repair: unmount, e2fsck -f /dev/<dev>.

5. df -h / df -i after.

Operational verification

mkfs.ext4 → mounted → journal protects metadata → resize2fs grows → e2fsck repairs

Evidence · next step

For Filesystems & Mounting → ext4, continue with the first unproven Topic check: Confirm ext4 UUID, backing size, mount state/options and feature set. If that boundary is healthy, advance to the adjacent check: Review kernel EXT4 errors, aborts, journal failures and read-only remounts. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Scope / prerequisiteUse it for general-purpose filesystems, or when an ext4 filesystem needs resizing or repair.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

5 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational evidence path Verify boundary

block device → ext4 superblock/features → journal + metadata trees → VFS mount/options → directory/inode lookup → file I/O → workload

Healthy evidence: superblock/features are recognized, journal is clean or recovers, no ext4 errors occur, block/inode headroom is sufficient and application I/O succeeds.

Step 2 Verification and output interpretation Verify boundary

Existing fast checks for this Topic. - Confirm ext4 UUID, backing size, mount state/options and feature set.

  • Review kernel EXT4 errors, aborts, journal failures and read-only remounts.
  • Measure both block and inode utilization before capacity conclusions.
  • Use filesystem-appropriate offline/online verification and then re-test workload I/O.

Verification chain. block device → ext4 superblock/features → journal + metadata trees → VFS mount/options → directory/inode lookup → file I/O → workload

Step 3 Commands Verify boundary
mkfs.ext4 -L data /dev/vg0/data
tune2fs -l /dev/vg0/data | head
e2fsck -f /dev/vg0/data   # unmounted only
Step 4 Failure modes and next checks Narrow the fault

Suspicious evidence: journal aborts, metadata checksum errors, forced read-only remount, inode exhaustion or an unresized filesystem on a larger device indicate an ext4-layer issue.

ext4 evidence shows filesystem metadata and mount behavior only for that filesystem, but it does not show underlying media/LVM health or application-level data correctness.

Step 5 Common mistakes Narrow the fault
  • Running fsck on a mounted filesystem.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points

Grow with resize2fs (online); shrink only unmounted. tune2fs -l shows settings; reduce the reserve on big data disks (tune2fs -m 1). Repair with e2fsck -f on an unmounted filesystem.

Key checks
  • findmnt — mount tree with options
  • df -hT — usage and filesystem types
  • findmnt --verify — check /etc/fstab
  • dmesg -T | grep -iE 'ext4|xfs|btrfs' — filesystem kernel messages
ReferenceWhat it is1 section · depth on demand

Core model

Identify exact ext4 device and UUID, then inspect mount state/options and kernel ext4 messages. Separate journal replay from full consistency checking, and avoid running offline repair tools against a mounted read-write filesystem. When resizing, coordinate lower-layer size with ext4 grow/shrink rules.

ReferenceImportant terms & boundaries6 sections · depth on demand

What this shows and what it does not

ext4 evidence shows filesystem metadata and mount behavior only for that filesystem, but it does not show underlying media/LVM health or application-level data correctness.

In depth

ext4: features, journal modes and tuning

ext4 is the default file system on many distributions, and the long-standing general-purpose choice. The kernel's ext4 documentation describes its main features:

  • Extents: reduce metadata and are more robust against corruption.
  • Delayed allocation (delalloc, on by default): postpones block allocation until data is written out, which gives better placement.
  • Journal checksums: help detect journal corruption.
  • Online resize: growth is done with resize2fs while the file system is mounted.

Journal data modes (documentation)

ModeBehaviour
data=ordered (default)Only metadata is journalled; data is written before its metadata commits
data=writebackNo ordering; fastest, but stale data can appear after a crash
data=journalData and metadata journalled; deprecated, with removal planned for January 2028

Mount options (documentation)

OptionEffect
errors=remount-ro / continue / panicBehaviour on file system errors (overrides the superblock setting)
commit=NMaximum transaction age in seconds (default 5)
barrier=1 (default)Enforce journal ordering on disk
discardOnline TRIM (off by default); periodic fstrim is usually better

Tools

TaskCommand
Createmkfs.ext4 -L data /dev/sdc1
Show superblock settingstune2fs -l /dev/sdc1 (or dumpe2fs -h)
Change the error behaviour, label or reserved blockstune2fs -e remount-ro, -L, -m 1
Check (unmounted)e2fsck -f /dev/sdc1
Grow (online) or shrink (offline)resize2fs /dev/sdc1 [size]
host$ sudo mkfs.ext4 -L appdata /dev/vg1/app
host$ sudo tune2fs -l /dev/vg1/app | grep -E "^(Filesystem features|Errors behavior|Reserved block count|Block count|Inode count)"
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg ...
Errors behavior:          Continue
Inode count:              6553600
Block count:              26214400
Reserved block count:     1310720
host$ sudo tune2fs -e remount-ro -m 1 /dev/vg1/app
host$ sudo umount /srv/app && sudo e2fsck -f /dev/vg1/app && sudo mount /srv/app
host$ systemctl status fstrim.timer --no-pager | head -3

Reading tune2fs

5 % of the blocks are reserved for root by default (1,310,720 of 26,214,400 here). On a large data volume, that's a lot of unused space. -m 1 lowers it to 1 %. Keep the reserve on the root file system, where it lets root-owned services keep working when users fill the disk.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Known-good, transitional and broken reference

ext4 — comparative operational reference for Filesystems & Mounting → ext4. What it does not show: systemd active/running or host-global state alone does not show the workload context is healthy Next check: move one step toward the original workload using Inspect the path and mount in the process namespace, effective UID/GID/ACL/LSM decision, filesystem/inode state and backend errors, then repeat the original file operation.

How it works at runtime

ext4 is part of Filesystems & Mounting → ext4. ext4 is a journaling Linux filesystem using superblocks, block groups, extents, inodes and a journal; operational health depends on metadata consistency, journal recovery, feature compatibility and available blocks/inodes.

Topic-specific state model. ext4 is a journaling Linux filesystem using superblocks, block groups, extents, inodes and a journal; operational health depends on metadata consistency, journal recovery, feature compatibility and available blocks/inodes.

Interpretation rule. - ext4 mounts ≠ all metadata is free of latent errors.

  • Journal replay success ≠ full fsck-style consistency evidence.
  • Free bytes available ≠ free inodes available.
  • Block device expanded ≠ ext4 filesystem expanded automatically.

Quick reference

ext4 administration:

mkfs.ext4 -L data -m 1 -E lazy_itable_init=0 /dev/vg/data
tune2fs -l /dev/vg/data | grep -E 'Inode count|Block count|Reserved|Mount count|state'
tune2fs -m 1 /dev/vg/data           # reserved blocks 1 %
tune2fs -c 0 -i 0 /dev/vg/data      # disable periodic fsck
resize2fs /dev/vg/data              # grow online / shrink offline
e2fsck -f /dev/vg/data              # unmounted
e4defrag -c /data

Inodes are fixed at mkfs time (-i bytes-per-inode, -N count); plan for many small files. Max file size 16 TiB, max volume 1 EiB.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Limits and how it fails

Primary failure point. ext4 evidence shows filesystem metadata and mount behavior only for that filesystem, but it does not show underlying media/LVM health or application-level data correctness.

ReferenceConfiguration & state1 section · depth on demand

Configuration, persistence and lifecycle

Distribution/platform context. ext4 owns ext4 metadata, journal, features and resize constraints. Generic mount semantics stay in Filesystems & Mounting; block/LVM layers remain below.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

Authoritative/upstream documentation reviewed for bounded claims in Filesystems & Mounting → ext4. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.kernel.org/filesystems/index.html · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
ext4 filesystemext4 journalext4 fsckext4 resize
Embedded reference data

Quick lookup tables

ext4 operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for ext4.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateext4 is a journaling Linux filesystem using superblocks, block groups, extents, inodes and a journal; operational health depends on metadata consistency, journal recovery, feature compatibility and available blocks/inodes.Establish exactly what this Topic owns before crossing into another subsystem.
Fast verificationPin host + incident/change time → capture block topology and stable identities → validate partition/device metadata → validate filesystem identity/integrity and effective mount namespace/options → validate PV/VG/LV/device-mapper state where used → make one controlled change at the first failed boundary → re-read effective storage state → repeat original workload I/O/acceptance test.Use the shortest evidence path first; a fast check is a boundary test, not blanket proof.
Verification chainblock device → ext4 superblock/features → journal + metadata trees → VFS mount/options → directory/inode lookup → file I/O → workloadTrace requested/configured state through effective state to the observed workload result.
Failure boundaryext4 evidence proves filesystem metadata and mount behavior only for that filesystem; it does not prove underlying media/LVM health or application-level data correctness.Stop broad troubleshooting at the first boundary that is not supported by evidence.
Positive evidenceCorrelated Linux storage evidence can establish this proof path: block device → ext4 superblock/features → journal + metadata trees → VFS mount/options → directory/inode lookup → file I/O → workloadUse this observation only for the specific claim it actually supports.
Evidence limitIt does not independently prove behavior outside the captured device, metadata, mapping, mount or workload scope. ext4 evidence proves filesystem metadata and mount behavior only for that filesystem; it does not prove underlying media/LVM health or application-level data correctness.Do not promote a local success signal into end-to-end or adjacent-dependency proof.
Next troubleshooting checkContinue from the first unproven boundary: prove backing identity, then on-device metadata, then filesystem/LVM mapping and effective mount/device state, and finally repeat the original workload I/O before any additional storage change.Continue to the next unresolved boundary while preserving the original test condition.

ext4 · operational reference

Compact Linux state, persistence, verification and boundary reference for fast lookup.

Reference boundaryext4
Topic pathFilesystems & Mounting → ext4
Runtime stateext4 is a journaling Linux filesystem using superblocks, block groups, extents, inodes and a journal; operational health depends on metadata consistency, journal recovery, feature compatibility and available blocks/inodes.
Fast checks- Confirm ext4 UUID, backing size, mount state/options and feature set. - Review kernel EXT4 errors, aborts, journal failures and read-only remounts. - Measure both block and inode utilization before capacity conclusions. - Use filesystem-appropriate offline/online verification and then re-test workload I/O.
Verification chainblock device → ext4 superblock/features → journal + metadata trees → VFS mount/options → directory/inode lookup → file I/O → workload Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary.
Failure boundaryext4 evidence proves filesystem metadata and mount behavior only for that filesystem; it does not prove underlying media/LVM health or application-level data correctness. Boundary chain: process credentials/namespace → path/mount lookup → DAC/ACL/LSM → filesystem metadata → block/device/backend → completion/read-back.
Persistence ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?