硬件 RAID 阵列扩展后 fdisk 不允许我使用额外的可用扇区

Vag*_*err 10 linux raid debian dell fdisk

我们在 Dell R720xd 上有一个约 18TB 的大型硬件 raid 阵列。目前 RAID5 阵列由 6x4TB 组成,我需要扩展它。

步骤1 扩展硬件raid 阵列。

如果您安装了戴尔管理工具,那就足够简单了。

omconfig storage vdisk action=reconfigure controller=0 vdisk=1 raid=r5 pdisk=0:1:0,0:1:1,0:1:3,0:1:3,0:1:4,0:1:5,0:1:8,0:1:9
Run Code Online (Sandbox Code Playgroud)

(新磁盘是最后两个,可以使用omreport工具确认)一切都很好,虽然需要一段时间,我能够确认阵列已经扩展..

% omreport storage vdisk controller=0 vdisk=1

Virtual Disk 1 on Controller PERC H710P Mini (Embedded)

Controller PERC H710P Mini (Embedded)
ID                                : 1
Status                            : Ok
Name                              : bak
State                             : Ready
Hot Spare Policy violated         : Not Assigned
Encrypted                         : No
Layout                            : RAID-5
Size                              : 26,078.50 GB (28001576157184 bytes)
...
Device Name                       : /dev/sdb
...
Run Code Online (Sandbox Code Playgroud)

第二步新建分区

因此,虚拟磁盘现在报告增加的 (26TB) 大小。并且fdisk同意...

Disk /dev/sdb: 25.5 TiB, 28001576157184 bytes, 54690578432 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A2D20632-37D1-4607-9AA0-B0ED6E457F91

Device     Start         End     Sectors  Size Type
/dev/sdb1   2048 39064698846 39064696799 18.2T Linux LVM
Run Code Online (Sandbox Code Playgroud)

但是,当我向磁盘添加其他分区时,会发生以下情况...

Command (m for help): n
Partition number (2-128, default 2): 2
First sector (34-2047): 
Run Code Online (Sandbox Code Playgroud)

我现在磁盘上还有大约 160 亿个扇区,但我无法使用它们。我只提供了 34-2047 扇区。即使我目前只设置了一个分区,我也无法分配 8TB 的新空间。

另一件让我感到奇怪的事情是,我得到的分区编号为 2-128,而不仅仅是 2-4。分区表没有显示任何扩展分区,所以我希望最初将我限制为 4 个分区。

有什么我想念的吗?

  • 自从扩展驱动器阵列后,机器已重新启动。在那之前 fdisk 只会报告原始的 18TB
  • cfdisk尽管总体上报告了 25TB,但尝试仅报告 2015 年可用的扇区在 390 亿范围内。
  • 如果我们可以避免它,我们不想删除和重新创建分区,因为我们可能会丢失所有数据。我们更愿意在完成后简单地使用新分区扩展 LVM 卷组。
  • 它与另一个服务器故障问题类似,但我不受分区用完的限制,而且我认为我不受扩展分区的限制。
  • 它不是由驱动器扩展扩展的扇区大小。如果是 fdisk 就不会报告扇区数量的增加,我会想到。另外pvsvgs不会在 LVM 下报告任何额外的未分配空间
  • 我在虚拟机上将其作为试运行运行,但没有遇到这种情况。但是我正在关闭虚拟机并增加其磁盘设备大小。所以它在大小增加期间不在线。此外,虚拟机的驱动器大小要小许多数量级。

更新 Micheal 请求的1 'x'pert 模式输出...

Command (m for help): x

Expert command (m for help): p
Disk /dev/sdb: 25.5 TiB, 28001576157184 bytes, 54690578432 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A2D20632-37D1-4607-9AA0-B0ED6E457F91
First LBA: 34
Last LBA: 39064698846
Alternative LBA: 39064698879
Partitions entries LBA: 2
Allocated partition entries: 128

Device     Start         End     Sectors Type-UUID                            UUID                                 Name      Attrs
/dev/sdb1   2048 39064698846 39064696799 E6D6D379-F507-44C2-A23C-238F2A3DF928 E9CB58BF-F170-4480-A230-6E2A238367D1 Linux LVM 


Expert command (m for help): v
MyLBA mismatch with real position at backup header.
1 error detected.
Run Code Online (Sandbox Code Playgroud)

那么一个可能的 LBA 错误?

Vag*_*err 6

问题是备份分区表位置。通常,您希望主分区表在开始,备份分区表在最后。磁盘调整大小使更多扇区可用,但从未移动备份表。fdisk 不喜欢这个,我相信这是MyLBA mismatch with real position at backup header.错误信息。不是很清楚。

我从fdiskto切换到gdisk,输出有点不同。在 gdisk 你有...

r       recovery and transformation options (experts only)
Run Code Online (Sandbox Code Playgroud)

进入并运行verify 给出了更有用的错误消息......

Recovery/transformation command (? for help): v

Problem: The secondary header's self-pointer indicates that it doesn't reside
at the end of the disk. If you've added a disk to a RAID array, use the 'e'
option on the experts' menu to adjust the secondary header's and partition
table's locations.

Identified 1 problems!
Run Code Online (Sandbox Code Playgroud)

gdisk专家模式下有以下选项...

e       relocate backup data structures to the end of the disk
Run Code Online (Sandbox Code Playgroud)

...成功运行,验证输出现在是...

Expert command (? for help): v

No problems found. 15625881566 free sectors (7.3 TiB) available in 2
segments, the largest of which is 15625879552 (7.3 TiB) in size.
Run Code Online (Sandbox Code Playgroud)

打印分区表现在显示最后一个可用扇区为 560 亿而不是 390 亿,我能够创建新分区并将其添加到 LVM 中,如果有人对此感兴趣,步骤是...

partprobe           <-- add the /dev/sdb2 device if you don't want to reboot 
pvcreate /dev/sdb2
vgextend bak /dev/sdb2
lvextend /dev/mapper/bak-bak -l 100%PVS -r
Run Code Online (Sandbox Code Playgroud)