简体   繁体   English

如何跨sda1和sda2管理Linux服务器存储

[英]How to manage Linux server storage across sda1 and sda2

I've recently upgraded my EC2 server from a m1.small to a m1.medium (old EC2 instances I know) so I have more storage as I recently maxed it out. 我最近将我的EC2服务器从m1.small升级到了m1.medium(我知道旧的EC2实例),所以随着最近的使用,我有更多的存储空间。

When I look at the space available through Terminal I have extra space available on a /dev/sda2 directory 当我查看通过终端可用的空间时,我在/ dev / sda2目录中有额外的空间

Is there a something I have done wrong when upgrading the server or will the storage automatically balance between the two if I reach 100% on /dev/sda1? 升级服务器时,我有做错什么吗?如果在/ dev / sda1上达到100%,存储会自动在两者之间保持平衡吗?

When I run a check I get the following information back: 运行支票时,我会得到以下信息:

终端输出

I've got 1% of 374Gb on /dev/sda2 available but I'm unsure how servers access this memory if /dev/sda1 reaches 100% 我在/ dev / sda2上有1%的374Gb可用空间,但是我不确定如果/ dev / sda1达到100%时服务器如何访问该内存

I'm a novice at server management so apologies if I'm doing something wrong. 我是服务器管理的新手,因此如果做错了事,我深表歉意。

I think you are confusing disk space and memory. 我认为您在混淆磁盘空间和内存。

On AWS, different instance types have different memory, cpu and network performances, but the storage space is unrelated: you can extend disk space on a EC2 machine without changing its instance type, by attaching a new disk. 在AWS上,不同的实例类型具有不同的内存,CPU和网络性能,但是存储空间无关:您可以通过附加新磁盘来扩展EC2计算机上的磁盘空间,而无需更改其实例类型。 I don't understand if your question is about disk space or memory, and I don't understand how a new disk appeared on your instance by simply upgrading it - probably it was there from instance creation. 我不了解您的问题是关于磁盘空间还是内存,也不了解通过简单升级新磁盘如何在您的实例上显示它-可能是从实例创建那里出现的。

Anyway, there isn't an "automatic balancing" of storage space - you have to manage your own files and move some files/folders to the new disk before the old one gets filled. 无论如何,存储空间没有“自动平衡”-您必须管理自己的文件,并将某些文件/文件夹移动到新磁盘上,然后再填充旧磁盘。 Working on Linux, you can leverage symbolic links to move large directories across disk without too much hassle. 在Linux上工作时,您可以利用符号链接在磁盘上移动大型目录,而不会带来太多麻烦。

  1. you are using m1.medium, which given as SSD. 您正在使用m1.medium(以SSD形式给出)。 So you just treat it as "virtual physical storage" given to you. 因此,您只是将其视为提供给您的“虚拟物理存储”。 So /dev/sda2 space is NOT extendable to /dev/sda1 因此/ dev / sda2空间不可扩展到/ dev / sda1

  2. The SSD storage given is call "instance store". 给定的SSD存储称为“实例存储”。 Anything inside /dev/sda are not permanent. / dev / sda中的任何内容都不是永久的。 You can REBOOT the instance and nothing lost . 您可以重新启动实例,而不会丢失任何内容。 HOWEVER, if you STOP or SHUTDOWN the instance, everything is gone. 但是,如果您停止或关闭实例,一切都消失了。 Do not pour important data in there. 不要在其中倒入重要数据。

    1. EBS volume normally are shown as /dev/xd* , which is extendable. EBS卷通常显示为/ dev / xd *,可以扩展。

Please check out. 请退房。 EC2 instance store EC2实例存储

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

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