简体   繁体   English

挂载EC2实例时出错

[英]Error when mounting an EC2 instances

I am following an online tutorial to set up an EC2 instance for a group project. 我正在关注在线教程,以为小组项目设置EC2实例。 http://www.developintelligence.com/blog/2017/02/analyzing-4-million-yelp-reviews-python-aws-ec2-instance/ . 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: 我使用的实例是r3.4xlarge,该教程说,如果我选择带有SSD的实例,则需要安装该实例并运行以下代码:

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

lsblk shows the following: lsblk显示以下内容:

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: 但是,当我运行sudo mount /dev/xvdb /mnt/ssd ,它给了我错误:

   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! 谢谢!

Before one mounts a filesystem in linux - the filesystem should be created. 在Linux上挂载文件系统之前,应先创建文件系统。

In this case it might be 在这种情况下,可能是

mkfs.ext4 /dev/xvdb

This would create an ext4 filesystem on a /dev/xvdb device. 这将在/dev/xvdb设备上创建ext4文件系统。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM