I'm having trouble mounting a newly created volume (general purpose SSD - gp2) of 100GB in an EC2 instance. I attach a newly created volume to an AWS instance through the AWS console. Now i search for the volume in the command line using
lsblk
which returns the following information
xvdf 202:80 0 100G 0 disk
Now when I try to mount the volume onto a directory
sudo mount /dev/xvdf /data
I get the following error
mount: /data: wrong fs type, bad option, bad superblock on /dev/xvdf, missing codepage or helper program, or other error.
Using the solution mentioned here, when I do
sudo mount /dev/xvdf1 /data -t ext4
However, I'm able to mount but when I try to create a folder mkdir temp
, I get the following error
mkdir: cannot create directory ‘temp1’: Permission denied