我们在戴尔R720xd上有一个大的18TB硬件RAIDarrays。 目前RAID5arrays由6x4TB组成,我需要扩展它。
第1步展开硬件RAIDarrays。
如果你已经安装了dellpipe理工具,那就够简单了。
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
(新的磁盘是最后两个,这可以通过使用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 ...
第2步新分区
所以虚拟磁盘现在报告增加的(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
但是,当我去添加一个额外的分区到磁盘下面发生…
Command (m for help): n Partition number (2-128, default 2): 2 First sector (34-2047):
我现在在磁盘上有大约160亿个扇区,但我不能使用它们。 我只提供34-2047部分。 即使我目前只设置了一个分区,我也无法分配8TB的新空间。
另一件令我奇怪的事情是我提供了分区号2-128,而不是简单的2-4。 分区表不显示任何扩展分区,所以我可以预料,最初只限制到4个分区。
有什么我失踪?
cfdisk只是报告了2015年的39亿个范围,尽pipe总共报告了25TB。 pvs和vgs在LVM下不报告任何额外的未分配空间 更新 1'x'pert模式输出Micheal请求…
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.
所以一个可能的LBA错误?
这个snafu的关键是这样的:
Last LBA: 39064698846
您的GPT标签不反映已更改的中等尺寸。 fdisk确实以不完美的方式search可用空间,但至less是逻辑的 – 它会在GPT Label的第一个和最后一个LBA之间的最大可用空间中查找第一个可用的扇区。
一个办法可能是使用sfdisk来转储标签,适当地编辑它到你的中等大小和写回来,或者更好地使用parted ,应该照顾这个问题IMO。
问题是备份分区表的位置。 通常情况下,您希望主分区表在开始和备份分区表结束。 磁盘大小调整使更多扇区可用,但从未移动备份表。 fdisk不喜欢这个,我相信这是MyLBA mismatch with real position at backup header. 错误信息。 不完全清楚。
我从fdisk切换到gdisk ,输出有点不同。 在gdisk中,你有…
r recovery and transformation options (experts only)
在进入和运行validation给了更有帮助的错误消息…
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!
在gdisk专家模式下,有以下选项…
e relocate backup data structures to the end of the disk
…成功运行,validation输出是…
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.
现在打印分区表显示最后一个可用的部门为56亿美元,而不是39亿美元,我能够创build新的分区,并将其添加到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