Execute first fdisk -l You can see the condition of the hard disk , The cloud disk is not mounted at this time .
fdisk -l Disk /dev/vda: 42.9 GB, 42949672960 bytes, 83886080 sectors Units =
sectors of 1 * 512= 512 bytes Sector size (logical/physical): 512 bytes / 512
bytes I/O size(minimum/optimal): 512 bytes / 512 bytes Disk label type: dos
Disk identifier: 0x000b1b45 Device Boot Start End Blocks Id System /dev/vda1 *
2048 83884031 41940992 83 Linux
<> one , Mount to the new directory

Hard drive is /dev/vda

Alibaba cloud console > Cloud server ECS > Click storage and snapshot in the left menu > Click cloud disk > Click more on the corresponding cloud disk > Click mount

Click mount and a dialog box will pop up .

Select the server you want to mount in the target instance . Click execute mount . Alicloud will prompt you that it is being mounted , Now wait for alicloud to mount the cloud disk .

Wait until the mount succeeds , get into Linux Command interface , input fdisk -l command
[root@iZm5e5w8irul9hn3uva51fZ ~]# fdisk -l Disk /dev/vda: 42.9 GB, 42949672960
bytes, 83886080 sectors Units = sectors of 1 * 512 = 512 bytes Sector size
(logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes
/ 512 bytes Disk label type: dos Disk identifier: 0x000b1b45 Device Boot Start
End Blocks Id System /dev/vda1 * 2048 83884031 41940992 83 Linux Disk /dev/vdb:
107.4 GB, 107374182400 bytes, 209715200 sectors Units = sectors of 1 * 512 =
512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size
(minimum/optimal): 512 bytes / 512 bytes [root@iZm5e5w8irul9hn3uva51fZ ~]#
You can see a hard disk /dev/vdb , We need to mount .

input fdisk /dev/vdb

Command (m for help): Enter this line n, Indicates adding a new partition . If input m You can view help .

Select (default p): input p, Default value

Partition Number(1-4 default 1): Number of partitions , We choose 1 Partitions , input 1 All right .

First sector(defualt 2048): Press enter directly , Use default values .

Last sector, +sectors or +size{K,M,G}: Press enter directly , Use default values .

Command (m for help): input w preservation

Finally, it will be prompted that the operation is successful .

input fdisk -l
[root@iZm5e5w8irul9hn3uva51fZ ~]# fdisk -l Disk /dev/vda: 42.9 GB, 42949672960
bytes, 83886080 sectors Units = sectors of 1 * 512 = 512 bytes Sector size
(logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes
/ 512 bytes Disk label type: dos Disk identifier: 0x000b1b45 Device Boot Start
End Blocks Id System /dev/vda1 * 2048 83884031 41940992 83 Linux Disk /dev/vdb:
107.4 GB, 107374182400 bytes, 209715200 sectors Units = sectors of 1 * 512 =
512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size
(minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier:
0x164093e9 Device Boot Start End Blocks Id System /dev/vdb1 2048 209715199
104856576 83 Linux
On hard disk /dev/vdb You can find it below devicce boot yes /dev/vdb1
Format hard disk :mkfs.ext3 /dev/vdb1
mkdir /data0 mount /dev/vdb1 /data0
Write partition table
echo '/dev/vdb1 /data0 ext3 defaults 0 0' >> /etc/fstab
<> two , Common errors

You may encounter the following errors when mounting :
[root@i4qr4iaaq ~]# mount /dev/vdb1 /root/relationship/ mount: /dev/vdb1 is
write-protected, mounting read-only mount: unknown filesystemtype '(null)'
The disk must be formatted before mounting , It is possible that you have not formatted the old disk mount . implement
mkfs.ext3 /dev/vdb1 You can format the disk , Then follow 1 Just follow the steps in .

Technology