I have a volume of 250 gb initially in one of my ec2 instance. I have increased the volume to 300gb. I could able to see that 300gb using the below command
But when i do df-h command i could not see the 300gb volume. Please help i am new to AWS
New volumes should be formatted to be accessible. Resized existing volumes should also be modified (resized) from the inside of the operating system.
The general information on how to do this safely (e.g. with snapshots) is given in the following AWS documentation:
Based on the discussion in comments, two commands were used to successfully solve the problem:
root
volume. –
Subteen lsblk
again? –
Subteen Let's solve step by step
ssh ubuntu@<Public IP> -i <Key Pair>
sudo df -hT
sudo lsblk
sudo growpart /dev/xvda 1
sudo lsblk
sudo df -hT
The size of the root filesystem is still X GB, and it needs to be extended. To extend different types of filesystems, different commands are used.
sudo resize2fs /dev/xvda1
sudo df -hT
I hope you are seeing the changes after running the resize2fs command, the size of the filesystem is increased.
New volumes should be formatted to be accessible. Resized existing volumes should also be modified (resized) from the inside of the operating system.
The general information on how to do this safely (e.g. with snapshots) is given in the following AWS documentation:
Based on the discussion in comments, two commands were used to successfully solve the problem:
root
volume. –
Subteen lsblk
again? –
Subteen df -h
df -T
sudo xfs_growfs /dev/nvme0n1p1
For ext4:sudo resize2fs /dev/nvme0n1p1
.Replace /dev/nvme0n1p1
with appropriate device identifier for your system.
sudo reboot
This command fixed my issue
sudo xfs_growfs -d /
Following this official document:
https://docs.aws.amazon.com/ebs/latest/userguide/recognize-expanded-volume-linux.html
© 2022 - 2024 — McMap. All rights reserved.
resize2fs
? – Baggett