user3697665
user3697665

Reputation: 307

Error when mounting an EC2 instances

I am following an online tutorial to set up an EC2 instance for a group project. http://www.developintelligence.com/blog/2017/02/analyzing-4-million-yelp-reviews-python-aws-ec2-instance/.

The instance I used is r3.4xlarge, the tutorial says if I chose an instance with an SSD, I need to mount that and run the following code:

lsblk
sudo mkdir /mnt/ssd
sudo mount /dev/xvdb /mnt/ssd
sudo chown -R ubuntu /mnt/ssd

lsblk shows the following:

NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
xvda    202:0    0    8G  0 disk
└─xvda1 202:1    0    8G  0 part /
xvdb    202:16   0  300G  0 disk

However, when I run sudo mount /dev/xvdb /mnt/ssd, it gives me the error:

   mount: wrong fs type, bad option, bad superblock on /dev/xvdb,
   missing codepage or helper program, or other error

   In some cases useful info is found in syslog - try
   dmesg | tail or so.

Could someone provide a solution to this error? Thanks!

Upvotes: 1

Views: 1554

Answers (1)

zerkms
zerkms

Reputation: 255045

Before one mounts a filesystem in linux - the filesystem should be created.

In this case it might be

mkfs.ext4 /dev/xvdb

This would create an ext4 filesystem on a /dev/xvdb device.

Upvotes: 1

Related Questions