Alibaba Cloud Server Data Disk Mounting and Capacity Expansion

Alibaba Cloud's disk has not been able to automatically expand, and I am also drunk, too pitiful. . .

Take a note:

1. First add or expand a data disk on the management console;

2. Restart the instance from the management console;

3. Take a look at fdisk -l, and you will find that there is a new disk, but the partition information of the disk has not been changed, as shown in the following figure:

 

4. Next just execute:

Command: fdisk /dev/xvdb

Enter n,p,1,w in turn

Then the rest can be directly returned;

Then in fdisk -l, you can see the following information:



 Yes, you have seen the partition information;

 

5. To mount the disk, just execute the following command:

mkdir /web

fdisk /dev/xvdbmkfs.ext4 /dev/xvdb1echo '/dev/xvdb1  /web ext4    defaults    0  0' >> /etc/fstabmount -a 
 
 
 

 

As long as there is no error, congratulations, the operation is completed, and then

df -h

The new disk is mounted, in the /web directory~

 

PS: What if you do twice: echo '/dev/xvdb1 /web ext4 defaults 0 0' >> /etc/fstab ?

It's okay, vi /etc/fstab goes in, just delete the redundant ones;

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326618578&siteId=291194637