Learn the step-by-step process of resizing the root volume and creating a new partition in Red Hat Enterprise Linux 9.0. Ensure optimal use of disk space with this comprehensive guide.
![]() |
| How to Resize the Root Volume and Create a New Partition in RHEL 9.0 | Amazon Linux EC2 Instance |AMI |
Resizing the root volume and creating a new partition in Red Hat Enterprise Linux (RHEL) 9.0 can be accomplished through the following steps:
- Stop the instance: If the root volume is being resized on a running instance, it must first be stopped.
- Take a snapshot: Before making any changes to the root volume, it's a good practice to take a snapshot of it as a backup.
- Resize the root volume: In the AWS EC2 console, select the root volume, choose the "Actions" menu and select "Modify Volume". Increase the size of the volume to the desired size.
- Start the instance: Start the instance after the root volume has been resized.
- Connect to the instance: Connect to the instance using ssh.
- Identify the new disk: Use the "lsblk" command to list all the block devices and identify the new disk.
- Create a new partition: Use the "parted" command to create a new partition on the new disk. Follow the prompts to create a new partition, set the partition type to "Linux" and write the changes to disk.
- Format the new partition: Format the new partition using the "mkfs" command and specify the desired file system type (such as ext4).
- Mount the new partition: Mount the new partition to a mount point using the "mount" command.
- Update the file system table: Update the file system table "/etc/fstab" to mount the new partition automatically on subsequent reboots.
Note: These steps are general and may vary slightly depending on your specific RHEL configuration. It's always a good idea to backup your data before making any changes to your instance.
Here are some example reference links:
