A practical guide for expanding the root (/) filesystem on Rocky Linux 10 when you’re not using LVM and the filesystem is ext4. This process uses cfdisk for partition resizing and resize2fs to expand the filesystem.

Prerequisites#

  • Root access to your Rocky Linux 10 system
  • The disk has unallocated space available
  • Filesystem type: ext4 (no LVM)
  • Basic understanding of disk partitioning

Step 1: Check Current Disk Layout#

First, view your current disk and partition configuration:

parted -l

This will display all disks and their partitions. Note your root partition’s current size.

You can also use lsblk to see a tree view:

lsblk

Step 2: Resize the Root Partition#

Use cfdisk to resize the partition interactively:

cfdisk /dev/mmcblk0

Note: Replace /dev/mmcblk0 with your actual disk device (e.g., /dev/sda, /dev/nvme0n1).

In the cfdisk interface:

  1. Select the root partition (e.g., mmcblk0p3)
  2. Choose the Resize option
  3. Resize to use all available free space
  4. Write changes to disk
  5. Quit the program

⚠️ Important: No reboot is required at this stage. The kernel will recognize the new partition size.

Step 3: Verify Partition Resize#

Confirm that the partition was successfully resized:

lsblk

Check that your root partition (e.g., mmcblk0p3) now shows the expanded size.

Step 4: Expand the Filesystem#

Now resize the ext4 filesystem to fill the newly expanded partition:

resize2fs /dev/mmcblk0p3

Note: Replace /dev/mmcblk0p3 with your actual root partition device.

You should see output similar to:

resize2fs 1.46.5 (30-Dec-2021)
Filesystem at /dev/mmcblk0p3 is mounted on /
The filesystem on /dev/mmcblk0p3 is now XXXXXX blocks long.

Step 5: Verify the Result#

Finally, verify that the filesystem has been expanded:

df -h /

You should now see the full disk space available under /. The Size column should reflect your new partition size.

Example output:

Filesystem      Size  Used Avail Use% Mounted on
/dev/mmcblk0p3   57G   12G   43G  22% /

Summary#

You’ve successfully expanded your root filesystem on Rocky Linux 10 without LVM! This method works for ext4 filesystems and doesn’t require a system reboot. The process involved:

  1. Checking current disk layout
  2. Resizing the partition with cfdisk
  3. Expanding the filesystem with resize2fs
  4. Verifying the changes