Extend the file system of EBS volumes on AWS EC2

To extend the file system of an EBS volume on an AWS EC2 instance, you can follow these steps:

    1. Login to AWS, then EC2
    2. Choose the instance you want to extend EBS.
    3. Under the storage tab, click on the volume ID
    4. Choose the volume, then action and Modify the volume.
    5. Enter the new volume and continue
    6. Login to SSH
    7. Enter the command
    8. Check the partition you want to extend. You should see something like this
      xvda 202:0 0 100G 0 disk
      └─xvda1 202:1 0 100G 0 part /
      loop0 7:0 0 2.8G 0 loop /home/virtfs/alleasyseo/var/tmp
    9. The partition you want to expand is xvda1 (for example). You need to write the following command:
      sudo growpart /dev/xvda 1
    10. Then write the following command
      sudo xfs_growfs -d /

      The slash (/) should be the disk to which you want to mount the drive.

To create SSL, run the following command:

sudo /opt/bitnami/bncert-tool

That’s it! You have successfully extended an EBS volume file system on an AWS EC2 instance.

Leave a Comment