Focus on cloud service provider activities
Notes on website operation and maintenance

AliCloud ECS server capacity expansion data disk is mounted without affecting data process records

Generally, we use it by default Alibaba Cloud ECS The server comes with a 40GB system disk. 40GB is enough for normal website construction or general projects, and 5GB is enough for ordinary websites. However, some friends have many pictures and download resources. Maybe 40GB is not enough. Today, Lao Zuo met a netizen who bought a 40GB mount disk separately from the 40GB system disk (I don't know what he thought at the beginning, but I think it can be combined together).

At present, it seems that Alibaba does not support direct expansion of the system disk. Instead, it can only expand the capacity of the attached disk. Then the netizen upgrades the data disk to 1000GB in the background (Yiyirui directly buys such a large disk). However, the direct upgrade does not take effect until the current attached disk needs to be expanded. Here Laozuo follows the official document to process the expansion.

PS: If we need to attach a disk when we start to buy a server, we suggest that we buy more than 40GB, because the system disk is only 40GB. It's basically meaningless for you to buy a disk lower than the system disk. Lao Zuo saw some netizens buy 10GB to store websites. It would be great if Alibaba could merge system disks directly one day.

Other Alibaba Cloud related articles we may still be looking for:

1、 Simply check the current promotion activities of domestic virtual machine service providers and the cost performance of host solutions

2、 AliCloud free Symantec DV SSL certificate application and HTTPS configuration method

3、 Common applications of AliCloud ECS - reinstalling the system, snapshot backup rollback restore, upgrade and downgrade configuration

First, preparations

1. Backup Backup

This is critical. 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

The server needs to be restarted in the background of the AliCloud account. Lao Zuo did not restart the server at the beginning of the operation. He only saw 40GB when expanding the capacity, but did not see 1000GB. He saw it after the restart.

3. Prudent operation

The following is a record of the operation I was helping a netizen. It was finally determined that it was OK, but it could not ensure that the method was universal, so we only used it for reference according to the actual application. Because some things are really unpredictable.

Second Alibaba Cloud capacity expansion operation

1. Check drive letter

 Alibaba Cloud ECS server capacity expansion data disk is mounted without affecting data process records - page 1

Here we can see the friend's system disk and data disk (almost full)

2. View system drive letter

 Alibaba Cloud ECS server capacity expansion data disk is mounted without affecting data process records - sheet 2

From fdisk - l, we can see that the current/dev/vdb is 1000GB, but actually our data disk is still the original 40GB, and needs to be expanded. PS: Alibaba should automatically expand it for users.

3. Pause WEB operation

service mysqld stop
service httpd stop
service nginxd stop
service pureftpd stop
service wdapache stop

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

4. Unload and mount

umount /dev/vdb1

Let's first remove the existing mount, and then re mount it later.

5. New Section

 Alibaba Cloud ECS server capacity expansion data disk is mounted without affecting data process records - sheet 3

fdisk /dev/vdb

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

6. Expanding disks

e2fsck -f /dev/vdb1
resize2fs /dev/vdb1

 Alibaba Cloud ECS server capacity expansion data disk is mounted without affecting data process records - sheet 4

The first step was a bit long. We waited patiently. The picture above shows that it was done.

7. Mount again

mount /dev/vdb1 /www

 AliCloud ECS server capacity expansion data disk is mounted without affecting data process records - page 5

Then we checked the lower panel and found that 1000GB was already in it.

8. Start WEB check website

service mysqld start
service httpd start
service nginxd start
service pureftpd start
service wdapache start

Here, we restart the previously closed WEB. If we are not sure, we restart the server. Because sometimes the mount is incomplete and will be lost after restart, we will check the website after restart.

 Alibaba Cloud ECS server capacity expansion data disk is mounted without affecting data process records - Page 6

Finally, all the operations above Laozuo were completed. Finally, the website was visited normally and the expansion was completed.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » AliCloud ECS server capacity expansion data disk is mounted without affecting data process records


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge