Article Title: GPT Disk: Use of disks larger than 2 TB in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Although the Fdisk command is interactive and convenient, it cannot be operated on disks larger than 2 TB. What if we want to use disks larger than 2 TB? You can convert a disk to the GPT format.
GPT-format disks are equivalent to 4*16 bytes of the four partition tables in the original MBR disk, with only the first 16 bytes, similar to extended partitions, the real partition table is 512 bytes later, and the GPT disk does not have the limit of four primary partitions.
However, fdisk does not support GPT. We can use parted to operate GPT disks.
The parted function is very powerful. It can be used in both the command line and interactive mode.
Enter parted at the prompt to enter interactive mode.
Parted>
Parted> mklable gpt format the MBR disk as GPT
Parted> mklable msdos converts a GPT disk to an MBR disk.
Parted> mkpart primary 0 100 divide a primary partition with a starting position of 0 and a size of MB.
Parted> mkpart primary 100 200 divide a primary partition with a starting position of m and a size of m
Parted> print current Partition
Ext3 file systems are not supported in parted, so if you want to use it, You need to exit parted for format.
Mkfs. ext3/dev/sdx1
Because fdisk does not support GPT disks, do not use fdisk-l to view the partitions allocated to disk X.
Command Line Mode:
After converting a hard disk to a GPT disk, run the following command:
Parted/dev/sdx mkpart primary 0 100 divides a primary partition with a starting position of 0 and a size of MB.