Translated message

A translation of this page exists in English.

如何扩展包含 GPT 分区表的磁盘?

Solution In Progress - Updated -

Issue

  • 在存储端扩展磁盘,并验证从操作系统是否可看到额外的空间后,每次发现磁盘时(即在引导过程中)都可能会看到以下消息:

    Nov  9 11:05:51 rhel72 kernel: sd 9:0:0:3: [sdd] 245760 512-byte logical blocks: (125 MB/120 MiB)
    Nov  9 11:05:51 rhel72 kernel: sd 9:0:0:3: Attached scsi generic sg4 type 0
    Nov  9 11:05:51 rhel72 kernel: sd 9:0:0:3: [sdd] Write Protect is off
    Nov  9 11:05:51 rhel72 kernel: sd 9:0:0:3: [sdd] Write cache: enabled, read cache: enabled, supports DPO and FUA
    Nov  9 11:05:51 rhel72 kernel: GPT:Primary header thinks Alt. header is not at the end of the disk.
    Nov  9 11:05:51 rhel72 kernel: GPT:212991 != 245759
    Nov  9 11:05:51 rhel72 kernel: GPT:Alternate GPT header not at the end of the disk.
    Nov  9 11:05:51 rhel72 kernel: GPT:212991 != 245759
    Nov  9 11:05:51 rhel72 kernel: GPT: Use GNU Parted to correct GPT errors.
  • 为什么不能使用所有磁盘空间来创建新的 GPT 分区?

    Model: Linux device-mapper (multipath) (dm)
    Disk /dev/mapper/mpathb: 245760s
    Sector size (logical/physical): 512B/512B
    Partition Table: gpt
    Disk Flags: 
    
    Number  Start  End      Size    File system  Name     Flags
     1      34s    100000s  99967s               primary
    
    (parted) mkpart primary 100001s 245700s                              
    Warning: You requested a partition from 100001s to 245700s (sectors 100001..245700).
    The closest location we can manage is 100001s to 212958s (sectors 100001..212958).
    Is this still acceptable to you?
    Yes/No? 
    
  • 调整了大小的磁盘未显示正确的、增加的大小。
    • 之前:
      # fdisk -lu /dev/sdaf
      WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
      
      Disk /dev/sdaf: 10.7 GB, 10737418240 bytes, 20971520 sectors
    • 在大小调整到 20GB 后,仍然显示以前的大小:
      # fdisk -lu /dev/sdaf
      
      Disk /dev/sdaf: 10.7 GB, 10737418240 bytes, 20971520 sectors
  • 调整磁盘大小后,fdisk 不再显示 GPT 表信息:
    • 之前:
      # fdisk -lu /dev/sdaf
      :
      Disk label type: gpt
    • 调整大小后:
      # fdisk -lu /dev/sdaf
      :
      Disk label type: dos

Environment

  • Red Hat Enterprise Linux (RHEL) 6, 7, 8, 9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content