GPT for Linux partitions (partitions larger than 2T)

Source: Internet
Author: User

1. File System Limitations:

Ext3
Block size maximum file size Maximum file system size
1KiB 16GiB 2TiB
2KiB 256GiB 8TiB
4KiB 2TiB 16TiB
8KiB 16TiB 32TiB

Ext4
Extents
Ext4introduced aExtentfile storage methods to replaceEXT2/3used byBlock MappingWay. Extentrefers to a series of continuous entitiesBlock, this approach can increase the efficiency of large archives and reduce the fragmentation of files. Ext4support for a singleExtent, in a singleBlockto be4KBsystems up to128mb[1]. SingleInodecan be stored in4PenExtent; over four pens.Extentwill takeHtreeThe Way is indexed.
Maximum file size-TiB (for 4k block filesystem)
Maximum volume capacity1 EiB

Xfs
The maximum supported file size is 263 = 9 x 1018 = 9 exabytes, and the maximum file system size is exabytes.

Reiserfs
Maximum file size 8 TiB
Maximum volume capacity ( TiB )

2. Partitioning operations

BecauseMBRPartitioned tables only support2Tdisk, so greater than2Tthe disk must useGPTPartition Table。 Gptformatted disk is equivalent to the originalMBRthe disk was originally reserved4aPartition Tableof the4*16of bytes,just leave the first one . -bytes, similar to an extended partition, the realPartition Tablein the +bytes,GPTthe disk does not have a limit of four primary partitions.
Butfdisknot supportedGPT, we can usepartedto theGPTdisk operations.
Partedpowerful, available in both command-line and interactive

Note: parted can only partition empty disks that have not made any partitions.

Enter parted at the prompt to enter interactive mode , If there are multiple disks, we need to run select sdx x as disk, to make disk selection

Here's how:

# PARTED/DEV/SDB

Using/dev/sdb

Welcome to GNU parted! Type ' help ' to view a list of commands.

(parted) Mklabel GPT # #将MBR disk formatted as GPT

(parted) Mkpart primary 0 # #划分一个起始位置为0 Primary partition of 100M size

(parted) Mkpart Primary # #划分一个起始位置为100M size 100M Primary partition

(parted) Mkpart primary 0-1 # #划分所有空间到一个分区

(parted) Print # #打印当前分区

(parted) Quit # #退出

Some of the commands that might be used

(parted) mklable Msdos # # Convert a GPT disk to an MBR disk

After partitioning this way , You also use mkfs.ext3 to format

#partprobe

#mkfs. Ext3-f/DEV/SDB1

Take Redhat 5 as an example:

Parted/dev/sdb Mklabel GPT. Convert to GPT.

Parted/dev/sdb Mkpart Primary 0 1000000 create a 1T partition.

Mkfs-t EXT4/DEV/SDB1

Mount/dev/sdb1/mnt/b

This way, the partition bof the large disk is hung in the mnt directory of the Linux system .

Start your own motion mount

Vi/etc/fstab

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

3. Install the system is the problem encountered:

Example: 1 Virtual Disk 2.5T when the system partition is installed, all remaining hard disk space (greater than 2T) is divided into one partition.

Workaround: Enter recovery mode directly in the Grub interface of the installation system

After entering, use the GPT tool in Shell mode, convert the disk to GPT format, and restart the installation system at reboot.

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.