删除孤立的 Ceph 卷

删除孤立的 Ceph 卷

我在三个节点上安装了 Ceph 集群,测试后需要完全重新安装。似乎在其中一个节点上,一些配置数据仍然保留,Ceph 仍在获取这些数据。

在启动时,Ceph 似乎正在寻找不再存在的旧 OSD。以下是我们的 的内容/var/log/ceph/ceph-volume.log

[2022-03-08 09:32:10,581][ceph_volume.process][INFO  ] Running command:
/usr/sbin/ceph-volume lvm trigger 1-f5f2a63b-540d-4277-ba18-a7db63ce5359
[2022-03-08 09:32:10,592][ceph_volume.process][INFO  ] Running command:
/usr/sbin/ceph-volume lvm trigger 3-eb671fc9-6db3-444e-b939-ae37ecaa1446
[2022-03-08 09:32:10,825][ceph_volume.process][INFO  ] stderr -->
 RuntimeError: could not find osd.2 with osd_fsid
e45faa5d-f0af-45a9-8f6f-dac037d69569
[2022-03-08 09:32:10,837][ceph_volume.process][INFO  ] stderr -->
 RuntimeError: could not find osd.0 with osd_fsid
16d1d2ad-37c1-420a-bc18-ce89ea9654f9
[2022-03-08 09:32:10,844][systemd][WARNING] command returned non-zero exit
status: 1
[2022-03-08 09:32:10,844][systemd][WARNING] failed activating OSD, retries
left: 25
[2022-03-08 09:32:10,853][ceph_volume.process][INFO  ] stderr -->
 RuntimeError: could not find osd.1 with osd_fsid
f5f2a63b-540d-4277-ba18-a7db63ce5359
[2022-03-08 09:32:10,853][ceph_volume.process][INFO  ] stderr -->
 RuntimeError: could not find osd.0 with osd_fsid
59992b5f-806b-4bed-9951-bca0ef4e6f0a
[2022-03-08 09:32:10,855][systemd][WARNING] command returned non-zero exit
status: 1
[2022-03-08 09:32:10,855][systemd][WARNING] failed activating OSD, retries
left: 25
[2022-03-08 09:32:10,865][ceph_volume.process][INFO  ] stderr -->
 RuntimeError: could not find osd.3 with osd_fsid
eb671fc9-6db3-444e-b939-ae37ecaa1446

为了进行比较,我们已安装的卷(由 找到ceph-volume lvm list)是 -

osd fsid                  3038f5ae-c579-410b-bb6d-b3590c2834ff
osd fsid                  b693f0d5-68de-462e-a1a8-fbdc137f4da4
osd fsid                  4639ef09-a958-40f9-86ff-608ac651ca58
osd fsid                  c4531f50-b192-494d-8e47-533fe780bfa3

您知道这些数据可能来自哪里吗?我该如何删除这些“孤立”卷?

答案1

我设法解决了这个问题。当 Ceph 设置其 OSD 时,它还会创建一个 systemd 服务文件来管理它们。

我必须跳进去/etc/systemd/system/multi-user.target.wants

并删除旧安装留下的每个麻烦的服务 -

systemctl disable [email protected]
systemctl disable [email protected]
systemctl disable [email protected]
systemctl disable [email protected]
systemctl disable [email protected]

相关内容