Pcornel
Browse topics
Options
Recent
Favorites
Storage · Technical reference

ext4 · Linux Storage

Direct answer

ext4 is the long-standing default Linux journaling file system: stable, fast to check and able to grow and shrink offline. It supports volumes up to 1 EiB and files up to 16 TiB.

When to use this

Use this when using or repairing ext4 file systems.

First 30 seconds

1. ext4: reliable default.

2. Fixed inodes.

3. Online grow, offline shrink.

4. Reserved blocks 5 % (adjust for data disks).

5. Periodic checks configurable.

Operational verification

files → ext4 → block device

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • Running out of inodes on file systems with many small files (set -i or -N at creation).
  • Forgetting -r with lvextend, then running resize2fs on the wrong device.
  • Skipping e2fsck -f before an offline shrink.
  • Disabling the journal for speed on important data.
Platform / version applicability
Linux Storage
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 Storage
Scope / prerequisiteUse this when using or repairing ext4 file systems.
What next?2 suggested next steps
Evidence1
On this pageJump to a specific section
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
  • ext4 can grow online and shrink offline.
  • Reserved blocks (5 %) are for root.
  • Inode count is fixed at creation.
Key checks
  • tune2fs -l /dev/<dev> | grep -E 'state|Mount count|Reserved block' — ext4 info
  • e2fsck -fn /dev/<dev> — check (unmounted)
  • resize2fs /dev/<dev> — grow
ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

ext4 on Linux servers: good defaults, online grow, offline shrink, mature repair tools.

mkfs.ext4 -L app -E stride=64,stripe_width=256 /dev/md0     # 256 KiB chunk, 4 data disks, 4 KiB blocks
tune2fs -o journal_data_writeback /dev/X                       # change default journal mode (with care)
tune2fs -c 0 -i 0 /dev/X                                       # disable periodic forced fsck
dumpe2fs -h /dev/X | grep -iE 'state|errors|features'

errors=remount-ro (default on many distributions) makes the filesystem read-only on metadata errors to prevent further damage — investigate with dmesg before remounting.

ReferenceConfiguration & state1 section · depth on demand

Commands

mkfs.ext4 -L data /dev/sdb1
tune2fs -l /dev/sdb1 | grep -E 'Block count|Reserved|Mount count'
tune2fs -m 1 /dev/sdb1             # reserved blocks 1 % instead of 5 % on data disks
resize2fs /dev/vg/lv               # grow (online) or shrink (offline)
e2fsck -f /dev/sdb1                # unmounted only

Documented example, not captured output. ext4 can shrink (unlike XFS); maximum file system 1 EiB, file 16 TiB. Running out of inodes (df -i) is possible with many small files.

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 Storage current

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

Basis: https://docs.kernel.org/block/index.html · confidence 94%
Confirmation

Confirm action

Continue?