Using GPT To Effectively Manage Disk Space

Click the blue text above to follow us

Resource Sharing
Linux Beginner to Advanced Practical Course
↓ Scan to watch the video ↓
Using GPT To Effectively Manage Disk Space

1. Concept

The GPT partitioning scheme uses a GUID partition table, which is a newer disk partition table structure standard derived from the EFI standard. Compared to the commonly used Master Boot Record (MBR) partition scheme, GPT provides a more flexible disk partitioning mechanism.

2. Features

1. Supports large hard drives over 2TB.

2. The number of partitions on each disk is almost unlimited. Why “almost”? Because the Windows system only allows a maximum of 128 partitions. However, this is more than enough.

3. The partition size is almost unlimited. Again, “almost”. This is because it uses a 64-bit integer to represent sector numbers. To exaggerate, the partition size that a 64-bit integer can represent is already an astronomical number, and you will not see such large hard drives for several years, let alone partitions.

4. The partition table has a built-in backup. A copy of the same partition table is saved at both the beginning and end of the disk. If one copy is corrupted, it can be restored from the other copy.

5. Each partition can have a name (different from the volume label).

3. Difference from MBR

The traditional MBR (Master Boot Record) partitioning method has a limitation: it cannot support partitions larger than 2TB (or a single partition larger than 2TB), which is unacceptable in today’s era of exploding data volume (especially for enterprise applications, where data volumes can easily reach several TB). This issue introduced the concept of GPT partitioning.

Globally Unique Identifier Partition Table (GPT)

GPT is a partition structure for physical disks. It is part of the Extensible Firmware Interface standard and is used to replace the Master Boot Record partition table in BIOS. Traditional Master Boot Record (MBR) disk partitions support a maximum volume of 2.2TB, with a maximum of 4 primary partitions per disk, or 3 primary partitions and 1 extended partition with multiple logical partitions within the extended partition.

Compared to the MBR partitioning method, GPT has more advantages because it allows each disk to have up to 128 partitions, supports volumes up to 18EB (exabytes), allows for redundancy with both primary and backup partition tables, and supports unique disk and partition IDs (GUID).

4. Summary

1. For disks smaller than 2TB, use fdisk /dev/sdb for partitioning, which is the MBR partition format.

2. For disks larger than 2TB, use parted /dev/sdb for partitioning, as MBR partition disks cannot exceed 2.2TB, so generally use GPT partition format for over 2TB.

Experiment

Create Partition

Using GPT To Effectively Manage Disk Space

Verify

Using GPT To Effectively Manage Disk Space

Format and Mount (Manual and Automatic)

mkfs.ext4 /dev/sdb1——Format

Manual Mount

mkdir /mnt——Create

mount /dev/hdd1 /mnt——Mount

df -hT——View

Using GPT To Effectively Manage Disk Space

Automatic Mount

Using GPT To Effectively Manage Disk Space

Using GPT To Effectively Manage Disk Space
Using GPT To Effectively Manage Disk Space
For course inquiries, add: HCIE666CCIE
↑ Or scan the QR code above ↑
What technical points and content do you want to see?
You can leave a message below to let us know!

Leave a Comment