How to mount a drive in a linux EC2

Hello Friends,
Recently, I was migrating my AWS services from one account to another and had to migrate my volume from one EC2 linux to another.
In the below steps, I will show you how to mount a drive into the linux system.
Before this, you must attach the volume to the instance from the AWS console.
As seen in the below snapshot, I have two volumes attached to my EC2 linux instance.

/dev/xvda is the root drive, while /dev/sdb is a volume that I attached from a previous snapshot.
Now, we login to the instance and start the process of mounting this volume to our linux EC2 instance.

By running the command, fdisk -l , you can list all the disks attached to the instance.

As we can see, we have two disks, xvda and xvdb. xvdb is the one that we attached from a snapshot.
Another way you can list the block devices is by running the command, lsblk.

Now, a way to check which disks are mounted on the instance is by running the command, df -h

As we can see, the xvdb isnt yet mounted. Now lets start mounting it.
First we make a new directoty to mount the drive. I made it in the root directory with the name ‘mydrive’. The command used was mkdir /mydrive.
Next, we make an entry into the etc/fstab file.

The first line is for the root disk, I added the second line.
Save the file and then run the command mount -a

This command will mount the disk. Now if you run the command df -h, you can see the mounted drive as seen below:

The /dev/xvdb1 represents the disk that we added separately.

References:
https://n2ws.com/blog/how-to-guides/connect-aws-ebs-volume-another-instance