Linux larger than 2T disk uses GPT partitioning method to share _linux

Source: Internet
Author: User
In Linux we can convert a large-capacity disk into a GPT format first. Because the GPT-formatted disk is equivalent to the 4*16 byte of the original MBR disk that originally retained 4 partition table, only the first 16 bytes are left, others are similar to extended partitions, and the true partition table is after 512 bytes. So there are no four primary partitioning restrictions on GPT disk tables.

To manipulate the GPT disk partition table, we use the powerful parted command.

Example: The commonly used parted command

# PARTED/DEV/SDB
GNU Parted 1.8.1
Using/dev/sdb
Welcome to GNU parted! Type ' help ' to view a list of commands.

(parted) Mklabel GPT
Format MBR disks as GPT

(parted) Mkpart primary 0 100
Divides a primary partition with a starting position of 0 size 100M

(parted) Mkpart primary 100 200
Divides a primary partition with a starting position of 100M size 100M

(parted) Mkpart primary 0-1

Divide all space into one partition

(parted) Print

Print Current partition

(parted) quit

Some of the commands that might be used

(parted) Mklable Msdos

If you want to reverse. Convert a GPT disk to an MBR disk

After partitioning is done, use MKFS.EXT3 to format

#partprobe

#mkfs. Ext3-f/DEV/SDB1

We practice under the operation:

Take Redhat 5 as an example:

Parted/dev/sdb Mklabel GPT. Converted into GPT.
Parted/dev/sdb Mkpart Primary 0 1000000 creates a 1T partition.
Mkfs-t EXT3/DEV/SDB1
Mount/dev/sdb1/mnt/b
This way, the partition B of the large disk is hung in the MNT directory of the Linux system.

Turn on and mount yourself

Vi/etc/fstab

/dev/sdb1/mnt/b Auto Defaults 0 0

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.