No matter how much disk space there is in any cloud server, the largest but on the 20G, Tencent cloud default Linux only 8GB system disk, the general web site is enough to use, if the additional purchase of the data disk after the installation system based on different panels, system path problems may not automatically load to the specified data disk directory, We need to manually load the data disk, which is what we used to say about mount. Today is a demonstration of how Tencent Cloud Linux systems Mount disks.
1, check whether the hard disk device has a data disk
Of course, I also know that I now have data on the disk, probably the server has 58G of disk space, 8G is the system disk then left 50G of the remaining space, then I put this 50G to mount.
Query command: fdisk-l
We can see that there is no mount on the 52GB data disk, look at the front path/dev/vdb
2, data hard disk partition
Execute command: FDISK/DEV/VDB
Enter N, p, 1, carriage return, carriage return, Wq
The VDB here is the name of the data hard disk that we see above, if you don't need to replace it with your real disk name, if it's the same as me, copy it directly.
3, EXT3 format partition
Execute command: MKFS.EXT3/DEV/VDB1
4. Mount New Partition
New directory: mkdir/Here is the Mount directory
Here I was mounted sdb1 (this directory is in the root directory), the directory is/SDB1, because I want to run the site http://xiangta.cc, so the site's mount directory is mkdir/sdb1.
Mount Partition: MOUNT/DEV/VDB1/SDB1
5, write fstab set up automatic mount
Echo '/dev/vdb1/sdb1 ext3 defaults 0 0 ' >>/etc/fstab
6. Check if the mount is successful
Query code: DF-H
From the picture below we can see that the mount has been successfully mounted
Note:
1, mount the list of their own settings, the above is my personal habits
2, this batch of articles so cloud server general