How to mount hard disk (data disk) in Tencent cloud and alicloud

Time:2021-6-9

Tencent cloud and Alibaba cloud generally have two disks, and the data disk needs to be hung in a partition

Check the data disk first   command

Copy code

The code is as follows:

fdisk -l

Partition the data disk

Copy code

The code is as follows:

fdisk /dev/xvdb

Format create mount

Copy code

The code is as follows:

mkfs.ext3 /dev/xvdb1

Copy code

The code is as follows:

mkfs.ext3 /dev/xvdb1
mkdir /mnt/data
mount /dev/xvdb1 /mnt/data

Finally, modify the startup item

Copy code

The code is as follows:

echo ‘/dev/xvdb1 /home ext3 defaults 1 2’ >> /etc/fstab

It’s a bit general. I just write down my own orders