rook使用磁盘原始模式出现的额外分区

系统:Ubuntu 20.04 LTS

内核:5.4

使用 rook/ceph:v1.8.6 镜像部署集群的时候,发现在4T机械硬盘上使用 磁盘原始模式 部署OSD,会额外创建一个大小为48G的分区,且block.db分区(metadataDevice)不见了,只有block分区

出现额外的48G分区
block和block.db两个分区

经过在github官网各种查找,最终找到了原因:

Even if we can use raw mode, do NOT use raw mode on disks. Ceph bluestore disks can sometimes appear as though they have “phantom” Atari (AHDI) partitions created on them when they don’t in reality. This is due to a series of bugs in the Linux kernel when it is built with Atari support enabled. This behavior does not appear for raw mode OSDs on partitions, and we need the raw mode to create partition-based OSDs. We cannot merely skip creating OSDs on “phantom” partitions due to a bug in ceph-volume raw inventory which reports only the phantom partitions (and malformed OSD info) when they exist and ignores the original (correct) OSDs created on the raw disk.

即使我们可以使用 raw 模式,也不要在磁盘上使用 raw 模式。 Ceph bluestore 磁盘有时看起来好像在其上创建了“幻像”Atari (AHDI) 分区,而实际上它们并没有。 这是由于在启用 Atari 支持的情况下构建 Linux 内核时出现的一系列错误。 这种行为不会出现在分区上的原始模式 OSD 中,我们需要原始模式来创建基于分区的 OSD。 由于 ceph-volume 原始清单中的一个错误,我们不能仅仅跳过在“幻像”分区上创建 OSD,该错误仅在幻像分区(和格式错误的 OSD 信息)存在时报告,而忽略在原始磁盘上创建的原始(正确)OSD。

# cat /boot/config-5.4.0-10* | grep -i ATARI
CONFIG_ATARI_PARTITION=y
CONFIG_ATARI_PARTITION=y

这是由于内核的BUG导致多了一个ACHI分区,虽然官方在2021年的 #7940 里面修复了这个问题,但是我在测试环境重复进行多次部署操作之后复现了,然后就无法恢复回去了,WTF

我尝试了不用dd,只用sgdisk格式化HDD盘,也试过手动将每个盘格式化成GPT格式并只分一个区,都不行

在参考了大量的官方文档之后,最终解决办法:

弃用v1.8.6,选择使用v1.8.7

附上严重参考的官方文档地址:

https://github.com/rook/rook/issues/7940

https://github.com/rook/rook/pull/8319

https://github.com/ceph/ceph/pull/42469

留下评论

error: Content is protected !!