Search code examples
amazon-web-servicesamazon-ec2volumevolumes

New volume in ec2 instance not reflecting


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 enter image description here

But when i do df-h command i could not see the 300gb volume. Please help i am new to AWS enter image description here


Solution

  • 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:

    • sudo growpart /dev/xvda 1
    • sudo resize2fs /dev/xvda1