Skip to content

Linux resize2fs Guide

Mattscreative edited this page Nov 20, 2025 · 2 revisions

📏 Linux resize2fs Guide

Complete beginner-friendly guide to resize2fs on Linux, covering Arch Linux, CachyOS, and other distributions including resizing ext filesystems, expanding partitions, and filesystem expansion.


📋 Table of Contents

  1. Understanding resize2fs
  2. resize2fs Basics
  3. Expanding Filesystems
  4. Shrinking Filesystems
  5. Troubleshooting

🎯 Understanding resize2fs

What is resize2fs?

resize2fs resizes ext filesystems.

Uses:

  • Resize filesystem: Change filesystem size
  • Expand filesystem: Grow filesystem
  • Shrink filesystem: Reduce filesystem size
  • Partition management: Manage filesystem size

Note: Only works with ext2, ext3, ext4 filesystems.


📏 resize2fs Basics

Expand to Full Size

Basic usage:

# Expand to partition size
sudo resize2fs /dev/sda1

# Expands to fill partition

Specific Size

Set size:

# Resize to specific size
sudo resize2fs /dev/sda1 10G

# Resizes to 10GB

📈 Expanding Filesystems

After Partition Expansion

Expand after resize:

# 1. Expand partition first (using fdisk/parted)
# 2. Then expand filesystem
sudo resize2fs /dev/sda1

# Expands to new partition size

Online Resize

Resize mounted:

# Resize mounted filesystem (ext4)
sudo resize2fs /dev/sda1

# Can resize mounted ext4 (if supported)

📉 Shrinking Filesystems

Shrink Filesystem

Reduce size:

# Shrink filesystem
sudo resize2fs /dev/sda1 5G

# Shrinks to 5GB
# Must unmount first

Unmount First

Unmount before shrink:

# Unmount first
sudo umount /dev/sda1

# Then shrink
sudo resize2fs /dev/sda1 5G

🔧 Troubleshooting

Cannot Resize

Check filesystem:

# Check filesystem type
sudo blkid /dev/sda1

# Verify it's ext2/3/4

📝 Summary

This guide covered resize2fs usage, filesystem resizing, and expansion for Arch Linux, CachyOS, and other distributions.


🔗 Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.

Clone this wiki locally