Alibaba Cloud Hard Drive Expansion

Record onceHard disk expansion, especially for Alibaba Cloud server system disk expansion, is based on the original hard disk size. The system disk can be increased to 500GB. If you add a data disk, a mount point for the data disk will be added to the Linux system root directory, that is, a new directory will be added to store data.

For beginners, you can just expand the system disk. For example, if you have only uploaded half of your website data and suddenly the hard disk is not enough, what should you do? At this time, you can just expand the system disk. If you store data separately, you can consider adding. Buy on Alibaba CloudLater, you will need to configure it in the server to make it effective.

Cloud disk snapshot

Note: You can create a cloud disk snapshot first. After the hard disk expansion is completed, delete it in time, otherwise you will be charged. If nothing unexpected happens, the cloud disk snapshot is useless.

Disk expansion is a high-risk operation. We also prohibit customers from performing expansion operations. 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 in case of expansion failure.

Creating snapshots 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 check it for you.
Alibaba Cloud strongly recommends that you take a snapshot of the server before troubleshooting. If you insist on asking Alibaba Cloud to conduct an investigation before you complete the snapshot, Alibaba Cloud will not bear any responsibility if your data or business is affected. Please be aware of this and reply "I understand and am willing to bear the risk. Please ask Alibaba Cloud to conduct an investigation on the server I use before the snapshot is completed."

Expanding the system disk

Log in to the Alibaba Cloud ECS console, and in the console menu, select Storage & 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 the online expansion option, and enter the capacity after expansion. The maximum capacity can be expanded to 500G.

In the last step, check the ECS terms of service below and click Confirm to expand the capacity. After payment, the system disk will be expanded.

After the system disk is 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

/dev/vda1 has a capacity of 200G. The system disk has been expanded successfully! Next time when the hard disk is not enough and you need to expand the capacity, just follow this method. Remember to expand the system disk, not add a new cloud disk.

If you want to 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 *