默认实例存储的m1.small不存在 [英] default instance storage for m1.small does not exist

查看:101
本文介绍了默认实例存储的m1.small不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我跑DF -h并得到了:

 的/ dev / xvde1 6.0G 1.9G 4.1G 32%/
没有828M 0 828M 0%的/ dev / shm的
 

和猫的/ etc / fstab文件:

  LABEL = _ / / EXT4默认值1 1
为/ dev / xvdb到/ mnt ext3的默认值,背景= system_u:object_r:usr_t:S0 0 0
没有的/ proc PROC默认值0 0
无/ SYS sysfs的默认值0 0
没有的/ dev /其中pts devpts GID = 5,模式= 620 0 0
没有的/ dev / shm的tmpfs的默认0 0
为/ dev / sda3的无掉期SW,评论= cloudconfig 0 0
 

lsblk的输出:

 名少校:分企业规模RO类型MOUNTPOINT
xvde1 202:65 0 0 6G硬盘/
xvde3 202:67 0 896M 0磁盘[SWAP]
 

我想的/ dev / xvdb是大约160 GB的我的实例存储。不过,我没有看到这个设备时,我在/ dev /.

有没有人知道我怎么能得到这个实例存储安装?

非常感谢

解决方案

如果你从微观实例(或者说只有EBS存储任何实例)升级,它不会被默认包含。 在任何情况下,你可以通过创建实例的快照,并重新发动添加。您可以在快照页面上添加,或在启动向导时,从现有的AMI启动。

  1. 开启EC2 Web管理控制台。
  2. 点击上实例左侧,选择您的实例,单击操作下拉菜单,然后选择创建图像。
  3. 在快照页面中输入一个名称和描述。您可以添加实例存储在这里,如果你喜欢或更高版本,当您启动AMI。点击添加音量按钮。选择备份存储0作为类型,和任何设备路径你喜欢。然后点击创建映像。
  4. 转至下的AMI在EC2管理控制台左边网站上的图片部分。
  5. 在等待你的新形象的AMI状态为可用。
  6. 选择新的AMI,单击启动顶部,并通过推出向导(经过的步骤,这样你就可以将它设置相同的安全组和密钥对作为当前服务器)。
  7. 在第4步,你有机会再次修改卷。确保零备份存储0被列为第二卷。
  8. 完成向导并等待发射。当你登录DF -h会显示音量。

有人推荐快照之前停止实例,但我从来没有遇到过的问题。在我的经验(使用ELB前方),而速动是由在服务器通常长达10分钟不可用。

  [EC2用户@ ABCD〜] $ DF -h
文件系统容量已用可用已用%挂载
为/ dev / xvda1 7.9克5.6克2.3G 29%/
tmpfs的8.29 0 8.29 0%的/ dev / shm的
为/ dev / xvdb 147G 188米140G 1%/媒体/ ephemeral0
 

这里更多信息: <一href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html#Using_AddingDefaultLocalInstanceStorageToAMI" rel="nofollow">http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html#Using_AddingDefaultLocalInstanceStorageToAMI

I ran df -h and got:

/dev/xvde1            6.0G  1.9G  4.1G  32% /
none                  828M     0  828M   0% /dev/shm

and cat /etc/fstab:

LABEL=_/   /         ext4    defaults        1 1
/dev/xvdb  /mnt      ext3    defaults,context=system_u:object_r:usr_t:s0  0 0
none       /proc     proc    defaults        0 0
none       /sys      sysfs   defaults        0 0
none       /dev/pts  devpts  gid=5,mode=620  0 0
none       /dev/shm  tmpfs   defaults        0 0
/dev/sda3       none    swap    sw,comment=cloudconfig  0       0

output of lsblk:

NAME  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
xvde1 202:65   0    6G  0 disk /
xvde3 202:67   0  896M  0 disk [SWAP]

I suppose /dev/xvdb to be my instance storage of around 160 GB. However, I do not see this device when I run ls -a on /dev/.

Does any one know how I can get this instance storage mounted?

thanks so much

解决方案

If you upgraded from a micro instance (or any instance that only has EBS storage), it won't be included by default. In any case, you can add it by creating a snapshot of your instance and relaunching. You can add it on the Snapshot page, or in the Launch wizard when launching from an existing AMI.

  1. Open EC2 Web Admin Console.
  2. Click on Instances on the left, select your instance, click the "Actions" dropdown, then select "Create Image".
  3. On the snapshot page enter a name and description. You can add the Instance Store here if you like or later when you launch the AMI. Click the Add Volume button. Select "Instance Store 0" as the type, and whatever device path you like. Then click "Create Image".
  4. Go to AMIs under the images section on the left site of the EC2 Admin Console.
  5. Wait for the AMI status of your new image to be "available".
  6. Select the new AMI, click Launch at the top and go through the launch wizard (go through the steps, so you can set it up with the same security group and key pair as your current server).
  7. On step 4 you have a chance to modify the volumes again. Make sure "Instance Store 0" is listed as the second volume.
  8. Finish wizard and wait for launch. When you login df -h will show the volume.

Some recommend stopping the instance before the snapshot, but I've never had a problem. In my experience (using an ELB in front) the server is usually unavailable for up to 10 minutes while the snap is made.

[ec2-user@ABCD ~]$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1      7.9G  2.3G  5.6G  29% /
tmpfs           829M     0  829M   0% /dev/shm
/dev/xvdb       147G  188M  140G   1% /media/ephemeral0

More info here: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html#Using_AddingDefaultLocalInstanceStorageToAMI

这篇关于默认实例存储的m1.small不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆