-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux resize2fs Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to resize2fs on Linux, covering Arch Linux, CachyOS, and other distributions including resizing ext filesystems, expanding partitions, and filesystem expansion.
- Understanding resize2fs
- resize2fs Basics
- Expanding Filesystems
- Shrinking Filesystems
- Troubleshooting
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.
Basic usage:
# Expand to partition size
sudo resize2fs /dev/sda1
# Expands to fill partitionSet size:
# Resize to specific size
sudo resize2fs /dev/sda1 10G
# Resizes to 10GBExpand after resize:
# 1. Expand partition first (using fdisk/parted)
# 2. Then expand filesystem
sudo resize2fs /dev/sda1
# Expands to new partition sizeResize mounted:
# Resize mounted filesystem (ext4)
sudo resize2fs /dev/sda1
# Can resize mounted ext4 (if supported)Reduce size:
# Shrink filesystem
sudo resize2fs /dev/sda1 5G
# Shrinks to 5GB
# Must unmount firstUnmount before shrink:
# Unmount first
sudo umount /dev/sda1
# Then shrink
sudo resize2fs /dev/sda1 5GCheck filesystem:
# Check filesystem type
sudo blkid /dev/sda1
# Verify it's ext2/3/4This guide covered resize2fs usage, filesystem resizing, and expansion for Arch Linux, CachyOS, and other distributions.
- fdisk Guide - Partitioning
- tune2fs Guide - Filesystem tuning
- Filesystem Management - Filesystem setup
-
resize2fs Documentation:
man resize2fs
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.