Here is how to add a new EBS volume to an existing EC2 instance and make it available to the Linux operating system.
After attaching the volume to the EC2 instance in AWS, follow these steps to add it to the file system.
lsblk
Use this command to find the device identifier, such as /dev/xvdf.
mkfs.ext4 /dev/xvdf
mkdir /mnt2
mount /dev/xvdf /mnt2
Do not forget to update /etc/fstab to make the change persistent.
LABEL=cloudimg-rootfs / ext4 defaults,discard 0 0
/dev/xvdb /mnt ext4 defaults 0 0
/dev/xvdf /mnt2 ext4 defaults 0 0
If you need to resize the volume, do so in the AWS Management Console and wait for the operation to finish. Then run the following command to make the additional space available:
resize2fs /dev/xvdf


cloud / systems