Skip to content
Advertisement

Why AWS instance not showing the correct storage that is attached externally?

I have attached an external EBS volume of 650GB to my ubuntu instance with a root volume of 250GB. 650GB is attached to /xvdg-volume

the result of lsblk

But if I check the df -h command it is not displaying the entire volume. You can see that in the following image: /xvdg-volume is only 350GB

the result of df -h

Does anyone say why this is happening in my case?

Advertisement

Answer

After the volume has been extended, the EC2 instance and the system both need to be adjusted to adapt to the new size.

To do this use the resize2fs method to resize the changed partition.

In your case will be something like this:

sudo resize2fs /xvdg-volume

You can also extend the partition and file system size after you have already grown the volume on the AWS side by simply rebooting your instance. When the operating system comes back up, it will modify everything itself.

For more information check here: How to Resize EBS Volumes on AWS

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement