Tencent Cloud Linux system How to mount a disk?

Source: Internet
Author: User
Tags mkdir root directory

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.