亚马逊EC2和EBS的磁盘空间问题 [英] Amazon EC2 and EBS disk space problem

查看:435
本文介绍了亚马逊EC2和EBS的磁盘空间问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,调和在我的EBS卷的可用空间。根据在AWS控制台的体积为50GB并连接到一个实例

I am having a problem reconciling the space available on my EBS volume. According to the AWS console the volume is 50GB and is attached to an instance.

如果我ssh到这种情况,做了DF -h,我得到以下的输出:

If I ssh to this instance and do a df -h, I get the following output:


Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              15G   13G  3.0G  81% /
udev                  858M   76K  858M   1% /dev
none                  858M     0  858M   0% /dev/shm
none                  858M   72K  858M   1% /var/run
none                  858M     0  858M   0% /var/lock
none                  858M     0  858M   0% /lib/init/rw

我是pretty的新AWS。我跨preT这是有连接的设备,它有15GB的容量。什么是更多,你几乎没有空间!

I am pretty new to AWS. I interpret this as "there is a device attached and it has 15GB capacity. Whats more, you're nearly out of space!"

任何人都可以点出广告在控制台的空间,什么之间的明显差异的原因是显示在实例?

Can anyone point out the cause of the apparent discrepancy between the space advertised in the console and what is displayed on the instance?

在预先感谢

取值

推荐答案

是的,这个问题很简单。体积仅与实例相关联,但没有安装

Yes, the issue is simple. The volume is only associated with the instance, but not mounted.

检查AWS控制台它被安装为这开车 - 最有可能的的/ dev / SDF

Check on the AWS console which drive it is mounted as - most likely /dev/sdf.

然后(在Ubuntu):

Then (on ubuntu):

sudo mkfs.ext3 /dev/sdf
sudo mkdir /ebs
sudo mount /dev/sdf /ebs

第一行格式化的卷 - 使用 EXT3 文件系统类型。这是pretty的标准 - 但根据您的使用情况(如应用服务器,数据库服务器,......),你也可以选择另外一个像的ext4 XFS

The first line formats the volume - using the ext3 file system type. This is pretty standard -- but depending on your usage (e.g. app server, database server, ...) you could also select another one like ext4 or xfs.

第二个命令创建一个安装点和第三坐骑就进去了。这意味着,有效,新卷将在 / EBS 。它也应该出现在东风了。

The second command creates a mount point and the third mounts it into it. This means that effectively, the new volume will be at /ebs. It should also show up in df now.

最后但并非最不重要的,也许还可以添加一个条目,以 / etc / fstab文件来使其重新启动防。

Last but not least, maybe also add an entry to /etc/fstab to make it reboot-proof.

这篇关于亚马逊EC2和EBS的磁盘空间问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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