Linux中MBR和GPT分區的區別

在Linux中對磁盤分區有兩個方案

1、MBR分區方案
2、GPT分區方案

MBR分區方案特點:

1、最多支持四個主分區,
2、在Linux上使用擴展分區和邏輯分區最多可以創建15個分區,
3、由於分區中的數據以32位存儲,使用MBR分區是最大支持2T空間。
4、fdisk管理工具只能創建MBR分區

GPT分區方案特點

1、是UEFI標準的一部分,主板必須要支持UEFI標準
2、GPT分區列表支持最大128PB(1PB=1024TB)
3、可以定義128個分區
4、沒有主分區,擴展分區和邏輯分區的概念,所有分區都能格式化
5、gdisk管理工具可以創建GPT分區

區分MBR和GPT分區

1、使用fdisk -l 命令

看到如下信息說明該分區是GPT分區

WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk label type: gpt

看到如下信息說明該分區是MBR分區

/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048   419430399   209202176   8e  Linux LVM

Disk label type: dos

fdisk -l 命令輸出

[root@localhost home]# fdisk -l

Disk /dev/sda: 214.7 GB, 214748364800 bytes, 419430400 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000bd24a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048   419430399   209202176   8e  Linux LVM
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/sdb: 214.7 GB, 214748364800 bytes, 419430400 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt

 Start          End    Size  Type            Name
 1         2048    419430366    200G  Linux filesyste Linux filesystem
<省略部分輸出>

2、使用parted -l

[root@localhost home]# parted -l
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 215GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  525MB  524MB  primary  xfs          boot
 2      525MB   215GB  214GB  primary               lvm


Model: VMware Virtual disk (scsi)
Disk /dev/sdb: 215GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End    Size   File system  Name              Flags
 1      1049kB  215GB  215GB               Linux filesystem

<省略部分輸出>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章