- Newest
- Most votes
- Most comments
Hello,
If it's for the root directory ("/"), simply restarting your instance should do the trick. If it's for a mounted volume, you can use the command: xfs_growfs -d <DEVICE_NAME>
To find the device name, you can run: lsblk
The device name will typically look like /dev/something
Hope it helps! 😊
Hi,
You may want to read this stream to obtain the specifics of partition extension for Rocky Linux: https://forums.rockylinux.org/t/how-can-i-extend-a-partition-capacity/11475/6
When you increase the storage size of an EC2 instance in AWS, the change is not automatically reflected in your operating system. You need to take additional steps to make the increased storage available on your Rocky Linux 7 instance. Here's how to do it:
-
First, verify that AWS has recognized the storage increase to 300 GB. You can do this in the EC2 console or by using AWS CLI.
-
Once confirmed, you need to extend the partition on your instance to use the additional space. You can use the 'growpart' command for this purpose:
sudo growpart /dev/xvda 1
(Replace /dev/xvda with your actual device name if different)
-
After extending the partition, you need to resize the file system to use the newly available space. For ext3/ext4 filesystems, use the 'resize2fs' command:
sudo resize2fs /dev/xvda1
(Again, adjust the device name if necessary)
-
If you're using XFS filesystem instead, use 'xfs_growfs':
sudo xfs_growfs /
-
After completing these steps, run 'df -h' again, and you should see the full 300 GB of storage available.
Remember to be cautious when modifying partitions and filesystems, as incorrect steps can lead to data loss. It's always a good idea to back up your data before making such changes.
If you encounter any issues or if these steps don't resolve the problem, you may need to check your specific partition setup or consult AWS support for further assistance.
Sources
EC2 Storage increased in AWS but not showing in Linux server | AWS re:Post
Why isn't my EC2 storage space upgrading? | AWS re:Post
Relevant content
- asked 9 months ago
- Accepted Answerasked 2 years ago
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago