简体   繁体   中英

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.

When I look at the space available through Terminal I have extra space available on a /dev/sda2 directory

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?

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%

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. 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.

  1. you are using m1.medium, which given as SSD. So you just treat it as "virtual physical storage" given to you. So /dev/sda2 space is NOT extendable to /dev/sda1

  2. The SSD storage given is call "instance store". Anything inside /dev/sda are not permanent. 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.

Please check out. EC2 instance store

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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