Skip to content

Instantly share code, notes, and snippets.

@mikepage
Last active June 30, 2025 21:53
Show Gist options
  • Save mikepage/abb9782608694005e10dd506cb52f124 to your computer and use it in GitHub Desktop.
Save mikepage/abb9782608694005e10dd506cb52f124 to your computer and use it in GitHub Desktop.

Install the required tools:

dnf install cloud-utils-growpart

Use growpart to extend the partition to the end of the disk:

growpart /dev/vda 4

Then verify the partition has grown:

lsblk

You should see /dev/vda4 now occupying the full available space.

Now grow the filesystem to fill the resized partition:

resize2fs /dev/vda4

This works even while the system is running, as long as the filesystem is mounted and not corrupted.

Check that the space has been successfully added:

df -h /dev/vda4
lsblk

Your /dev/vda4 partition is now extended and fully utilizes the available disk space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment