Alibaba Cloud hard disk expansion

record once,服务器系统盘扩容,是在原硬盘大小的基础上,进行增加,系统盘可以增加到500G。如果增加数据盘的话,会在linux系统的根目录下,增加数据盘的挂载点,也就是新增一个目录,用来存放数据。

For novices, just expand the system disk. For example, if your website data is only half uploaded, and suddenly the hard disk is not enough, what should you do? At this time, it is enough to expand the system disk. If the data is stored separately, you can consider adding a new. Purchase on Alibaba CloudIn the future, you will need to configure it in the server for it to take effect.

Cloud disk snapshot

Note: Cloud disk snapshots can be created first. After there is no problem with hard disk expansion, delete them in time, otherwise you will be charged. If nothing else, cloud disk snapshots are useless.

Disk expansion is a high-risk operation, and we prohibit expansion operations for customers. Please create a snapshot before performing related operations to avoid data loss. For details on creating a snapshot, see:https://help.aliyun.com/document_detail/25455.html
You log in to the server and execute the following command:

fdisk -l df -Th blkid

The first step is to create a cloud disk snapshot to avoid data loss due to expansion failure.

Snapshot creation is billed separately,
Create a snapshot reference document:https://help.aliyun.com/document_detail/25455.html
For snapshot billing rules, please refer to:https://help.aliyun.com/document_detail/56159.html
After the snapshot is completed, we will obtain the authorization and we will check and verify it for you.
Alibaba Cloud strongly recommends that you take a snapshot of the server before troubleshooting. If you insist on requiring Alibaba Cloud to conduct troubleshooting before you complete the snapshot, Alibaba Cloud will not bear any responsibility if your data or business is affected as a result. Please know and reply "I understand and voluntarily bear the risk, please Alibaba Cloud The cloud will check the server I am using before the snapshot is completed."

Expand system disk

Log in to Alibaba Cloud's cloud server ECS console. In the console menu options, select Storage and Snapshots.cloud disk. Find the system disk you are using.

Behind the system disk, click More and select cloud disk expansion.

Next, expand the system disk, check online expansion, and then enter the expanded capacity. The maximum capacity can be expanded to 500G.

In the last step, after checking the cloud server ECS service terms below, click to confirm the expansion. After paying, the system disk will be expanded.

After the system disk has been expanded, enter the following command on the server to check whether the system disk has been expanded.


yum install -y cloud-utils-growpart growpart /dev/vda 1 xfs_growfs/df -Th

The capacity of /dev/vda1 is 200G, and the system disk has been successfully expanded! Next time the hard disk is not enough and you need to expand it, just expand it in this way. Remember, you are expanding the system disk, not adding a new cloud disk.

If you add a new cloud disk, the steps are quite complicated.

 

score

Leave a Reply

Your email address will not be published. Required fields are marked *