专属企业存储服务-Linux(CentOS)磁盘扩容后处理(fdisk):查看分区方式

时间:2023-11-01 16:13:34

查看分区方式

分区前,需要查看当前磁盘的分区方式,当为MBR时可以选择fdisk或者parted工具,当为GPT时需要使用parted工具。

  1. 执行以下命令,查看当前磁盘的分区方式。

    fdisk -l

    回显类似如下信息:
    [root@ecs-1120 linux]# fdisk -lDisk /dev/xvda: 42.9 GB, 42949672960 bytes, 83886080 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: dosDisk identifier: 0x000c5712    Device Boot      Start         End      Blocks   Id  System/dev/xvda1            2048    83886079    41942016   83  LinuxWARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.Disk /dev/xvdb: 161.1 GB, 161061273600 bytes, 314572800 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: gpt#         Start          End    Size  Type            Name 1           34    209715166    100G  Microsoft basic opt 2    209715167    314572766     50G  Microsoft basic opt1WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.Disk /dev/xvdc: 42.9 GB, 42949672960 bytes, 83886080 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: gpt#         Start          End    Size  Type            Name 1           34     16777215      8G  Microsoft basic opt 2     16777216     83884031     32G  Microsoft basic opt

    “Disk label type”表示当前磁盘的分区方式,dos表示磁盘分区方式为MBR,gpt表示磁盘分区方式为GPT。

support.huaweicloud.com/usermanual-dess/hw_ppeo_linux_fdisk.html