查看分区类型

[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会方便许多。

Logo

欢迎加入DeepSeek 技术社区。在这里,你可以找到志同道合的朋友,共同探索AI技术的奥秘。

更多推荐