Alibaba Cloud ECS server expansion data disk mounting without affecting data process recording

888u

Last update at :2024-07-06,Edit by888u

Generally, when we use the Alibaba Cloud ECS server by default, it comes with a 40GB system disk. 40GB is enough for normal website building or general projects. 5GB is quite enough for an ordinary website. However, some friends have a lot of pictures and download resources, so 40GB may not be enough. Today Snail met a netizen who didn’t use the 40GB system disk, but purchased a 40GB mount disk separately (I don’t know what he thought at the beginning) , it is estimated that they can be combined and used together).

At present, it seems that Alibaba does not support the direct expansion of the system disk, but can only expand the capacity of the mount disk. Then this netizen upgraded the data disk to 1000GB in the background (I bought such a large one directly), but after the direct upgrade, it did not work. If it does not take effect to the current mounted disk, it needs to be expanded. Here Snail will follow the official documentation to handle the expansion.

PS: If we start to buy a server and need a mounting disk, it is recommended to buy one with more than 40GB, because the system disk is only 40GB. It is basically meaningless for you to buy one smaller than the system disk. Snails also saw some netizens before Bought 10GB for website storage purposes. It would be great if one day Alibaba could directly merge the system disks.

Other Alibaba Cloud related articles we may be looking for:

1. A brief inventory of the current promotions and cost-effectiveness of cloud hosting service providers in mainland China

2. Alibaba Cloud free Symantec DV SSL certificate application and HTTPS configuration method

3. Common applications of Alibaba Cloud Server ECS – system reinstallation, snapshot backup rollback and restore, upgrade and downgrade configuration

First, preparations

1. Backup, backup, backup

This is very important. We can choose snapshot backup and local backup, because unknown problems may cause errors. We can also restore snapshots and backup data.

2. Restart the server

You need to restart the server in the background of your Alibaba Cloud account. Snail did not restart the server at first when operating. When expanding the capacity, you only see 40GB and not 1000GB. You can see it after restarting.

3. Operate with caution

The following is a record of what I was doing for a netizen. It was finally confirmed that it is possible, but there is no guarantee that the method is universal, so our operation is only for reference, based on actual applications. Because some things are really unpredictable.

Second, Alibaba Cloud expansion operation

1. Check the drive letter

Here we can see this friend’s system disk and data disk (basically full)

2. Check the system drive letter

You can see through fdisk -l that the current /dev/vdb has 1000GB, but in fact our data disk is still the original 40GB and needs to be expanded. PS: Alibaba should automatically expand the service for users.

3. Pause WEB operation

service mysqld stopservice httpd stopservice nginxd stopservice pureftpd stopservice wdapache stop

Snail saw that this friend was using WDCP, and then he paused the WEB server first.

4. Uninstall the mount

umount /dev/vdb1

Let’s unmount the existing one first and then remount it later.

5. Create a new partition

fdisk /dev/vdb

Execute the command, then enter d n p 1 Enter Enter wq

6. Disk expansion

e2fsck -f /dev/vdb1resize2fs /dev/vdb1

The first step is a bit long, so we waited patiently. Seeing the picture above means it’s done.

7. Mount again

mount /dev/vdb1 /www

Then we check the lower disk and see that 1000GB is already there.

8. Start the WEB inspection website

service mysqld startservice httpd startservice nginxd startservice pureftpd startservice wdapache start

Here we restart the previously closed WEB. If we are not worried, we restart the server again, because sometimes the mounting is incomplete and is lost after restarting. We will check the website again after restarting.

Finally, after all the above operations, the website can be accessed normally and the expansion is completed.

Recommended site searches: virtual host purchase, Korean website domain name, IP reverse check French proxy server, domain name registration center, virtual host, Jiangxi server rental, expired domain name query, independent IP space, free application for domain name and space

Alibaba Cloud ECS server expansion data disk mounting without affecting data process recording

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码