区分mbr与gpt分区

查看分区类型

[root@localhost ~]# parted -l|egrep'dev/|Part'

Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0

has been opened read-only.

Disk /dev/sda: 137GB

Partition Table: gpt #gpt分区

1 1049kB 211MB 210MB fat16 EFI System Partition boot

Disk /dev/sdb: 34.4GB

Partition Table: msdos #mbr分区

Disk /dev/mapper/centos-home: 25.8GB

Partition Table: loop

Disk /dev/mapper/centos-swap: 13.7GB

Partition Table: loop

Disk /dev/mapper/centos-root: 96.6GB

Partition Table: loop

Disk /dev/sr0: 10.2GB

Partition Table: msdos

[root@localhost ~]# fdisk -l |egrep'dev/|type'

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

Disk /dev/sda: 137.4 GB, 137438953472 bytes, 268435456 sectors

Disk label type: gpt    #gpt分区

Disk /dev/mapper/centos-root: 96.6 GB, 96636764160 bytes, 188743680 sectors

Disk /dev/mapper/centos-swap: 13.7 GB, 13744734208 bytes, 26845184 sectors

Disk /dev/mapper/centos-home: 25.8 GB, 25769803776 bytes, 50331648 sectors

Disk /dev/sdb: 34.4 GB, 34359738368 bytes, 67108864 sectors

Disk label type: dos    #mbr分区

/dev/sdb1 20486293503314572883 Linux

硬盘分区使用分区工具常用fdisk或者parted都行,fdisk交互分区易读性非常高,parted便于在命令行一键操作;对于已经分区过的盘继续分区,使用fdisk会方便许多。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值