Linux under disk partition mount

Source: Internet
Author: User

Generally you go to buy VPS will see the introduction said hard disk how many g such as 80G

But when you get into the system, you find out how it's only 10G, Df-h.

In fact, this 10G is used to install the system and some of the most popular service software is not to put your website data

Where is the 50G hard drive, just like you add a new hard disk to your computer, you don't have to partition and mount it.

So let's first look at the partition of the hard disk inside the computer.

I can see that only the SDA drive is partitioned, and SDB has no partitions.

So we're not going to see the DF, so now we're going to hang up this hard drive partition.

The first is the partition:

The following in the sub-extended partition (sub-primary partition score expansion partition One less step, the other as below will prompt)

I chose the second hard drive/dev/sdb Note that there are no numbers behind SDB.

There are only a few common commands for Fdisk, which we'll use in turn, no need to remember.

M: Show Help Menu

N: Create a new disk partition

After entering the Fdisk command, all actions such as partitioning are a state and no real completion wait until the end of the operation and press W to save it.

If there is an error in the middle of the operation or you go back and press Q to exit without saving

You can see that I first showed the Help menu with M and then n new disk partition He asked me to choose whether to create a new extended or primary partition

I chose the extended partition if you want to build the main partition select the corresponding P option

Next we set the partition number start cylinder end cylinder (specific size) specific one cylinder is how much capacity please Baidu, if the cylinder is not familiar with

You can also enter +50g to allocate 50G size +500m +5555500k are all Yes

The rest of the space can continue to partition like a 500G hard disk you can divide the C disk D disk E disk can also be directly to the 500G to C drive

The default is the entire hard disk size I am here by default carriage return

If you choose the primary partition then partition this step is good, if you like me to choose the extension partition then there is a second step:

It's just a matter of repeating the previous step. Note that selecting a Partition type first option is changed from the original extended partition to the ROM partition

This place we choose the first option L ROM partition note the hints inside the brackets below (5 or over) also say that the number of the ROM partition is more than 5

Other places all the way up then W save

All right, the partitions are divided.

Now you want to specify the storage format of the partition as if Windows has FAT32 NTFS, there are also many types under Linux

Currently, Linux defaults to ext3

Specify partition format

First, we'll check the number of the partition we assigned.

Note that SDB1 is an extended partition extension partition that can have a lot of ROM partitions, which means that the extended partition is a virtual concept and the logical partitioning is what really exists.

So when we specify the format, we specify that the extended partition will be an error, so we're going to specify the format of the ROM partition

Now that the format is specified, continue to mount the partition to the specified directory and you're done.

Mkdir/web

Mount/dev/sdb5/web

It is now mounted on the use DF view

Now it's just a temporary mount. We'll have him mount it automatically the next time we boot.

Vi/etc/fstab

Linux under disk partition mount

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.