Objective: In this lab, the student will create an extra EBS volume and will attach it to Windows and Linux machines using the AWS console.
EBS Volume:
Amazon Elastic Block Store (Amazon EBS) provides block level storage volumes for use with EC2 instances. EBS volumes behave like raw, unformatted block devices. You can mount these volumes as devices on your instances. EBS volumes that are attached to an instance are exposed as storage volumes that persist independently from the life of the instance. You can create a file system on top of these volumes or use them in any way you would use a block device (such as a hard drive). You can dynamically change the configuration of a volume attached to an instance.
Task 1: Create AWS windows EC2 instance and connect it using RDP protocol. (https://youtu.be/WQTQL5Q729Q)
Task 2: Create AWS Linux Instance and connect with it using SSH protocol.
Web Link: https://youtu.be/clTfONW7P9Q
Task 3: Create EBS volume in the same availability zone as of EC2 instances.
Task 4: Attach and mount EBS volume with the Windows EC2 instance.
Task 5: Attach and mount EBS volume with the Linux EC2 instance using the following commands
Commands:
Show all the volumes attached to the EC2 instance
df -h
Lists all the block devices in the Linux Machine:
lsblk
Create a Filesystem on the EBS Volume:
1. Create a directory to be used as the mount point:
mkdir -p /mnt/ebs_volume
2. Create a filesystem on the attached volume:
mkfs -t ext4 /dev/xvdf
Now if we verify if the new file system exists use the below command and you should see the output:
file -s /dev/xvdf
Mount the EBS Volume:
mount /dev/xvdf /mnt/ebs_volume
Now, check all the available volumes
df -h