If prompted:
disk /dev/vdb doesn't contain a valid partition table means that the data disk has not been partitioned and mounted.
It means that you have unallocated data disks that are not in use, continue to the next step of " partitioning ".
If prompted:
Device Boot Start End Blocks Id System
/dev/vdb1 * 2048 83884031 41940992 83 Linux
Note that /dev/vdb1 is the data disk, and /dev/vda1 is the system disk.
It means that the purchased data disk has been formatted before, and the formatted data disk can be directly mounted by skipping step 4 .
Switch to root account;
Run fdisk /dev/vdb to partition the data disk. According to the prompt, enter n, p, 1 in turn, enter twice, wq, the partition starts.
n: stands for new, create a new partition
p: stands for primary, set as the primary partition
1: represents the number of partitions 1
The first carriage return: It represents the starting position of the partition and starts from sector 1 by default.
The second carriage return indicates that the end position of the partition uses the default last sector.
(meaning: divide the whole block of data into 1 primary partition, and the created partition partition name is xvdb1)
wq, on behalf of save and execute the above partition. Partitioning begins!
Use fdisk -l again to see the new partition, as follows:
Device Boot Start End Blocks Id System
/dev/vdb1 * 2048 83884031 41940992 83 Linux
echo
'/dev/vdb1 /vol1 ext3 defaults 0 0'
>> /etc/fstab