Linux 命令行判断GPT和MBR分区
常用的磁盘分区形式有主启动记录分区(Main Boot Record,MBR)和全局分区表(Guid Partition Table,GPT),磁盘投入使用后再切换磁盘分区形式,磁盘上的原有数据将会清除,因此请根据实际需求合理选择分区形式。
分区形式 | 支持最大磁盘容量 | 支持分区数量 | 分区工具 |
MBR | 2TB | 4个主分区 3个主分区和1个扩展分区 | Windows 操作系统:磁盘管理
Linux 操作系统:
|
GPT | 18EB
目前云硬盘支持的最大容量为32TB | 不限制分区数量 | Windows 操作系统:磁盘管理
Linux 操作系统:parted 工具 |
fdisk -l

parted -l

[root@hezhiqiang ~]# parted /dev/sdb
(parted)mktable
New disk label type? msdos
Warning: The existing disk label on /dev/sdb will be destroyed and all data on
this disk will be lost. Do you want to continue?
Yes/No?Yes
使用免交互加上 -s
parted /dev/sdb mklabel msdos -s #转换成mbr格式
parted /dev/sdb mklabel gpt -s #转化成gpt格式