Linux Disk Partitioning

Source: Internet
Author: User

The first step:

Have a certain understanding of the status of the system's current disks. This is going to use the fdisk-l command.

Fdisk-l

    

As can be seen/dev/sdb/is not partitioned, the following example we are going to partition the/dev/sdb and also to attach it to the Linux directory tree up.

Step Two:

Fdisk/dev/sdb--This means to operate on the/DEV/SDB disk,

    

As shown, the instructions have entered the Fdisk program; Some of its important operations are

1, p print the current partition information

2. L View available partition types

3, n Create a new partition

4, d Delete a partition

5, T set the type of partition

Step Two: Partition the disk

1. Enter n

    

The program will indicate whether to create a primary partition (P) or an extended partition (e), and the difference between the two partitions is not mentioned here.

2, enter p is to establish the primary partition

    

Partition number, the starting sector does not work the default can be, the last sector will be decided by itself this is the space you want to allocate to the partition, such as the allocation of 4G space you want to write +4g; Remember there is a ' + ' sign here.

3. Enter W to write this to disk.

    

4. Format disk, MKFS.EXT3/DEV/SDB1

    

5. Mount MOUNT/DEV/SDB1/MNT/SDB1

    

You can see that the/DEV/SDB1 is not mounted to the Linux directory tree, and we're going to put it up there.

    

6, if we want to hang up can be so umount/dev/sdb1--that is, with the specified disk partitioning method to complete

    

It is also possible to do so umount/mnt/sdb1-that is, by specifying a mount point

    

    

    

Linux Disk Partitioning

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.