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:
-
- Login to AWS, then EC2
- Choose the instance you want to extend EBS.
- Under the storage tab, click on the volume ID
- Choose the volume, then action and Modify the volume.
- Enter the new volume and continue
- Login to SSH
- Enter the command
lsblk
- Check the partition you want to extend. You should see something like this
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT 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
- The partition you want to expand is xvda1 (for example). You need to write the following command:
sudo growpart /dev/xvda 1
- 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.