admin 发表于 2024-10-17 11:10:52

ceph 分布式存储15以上版本mon报错解决办法 使用cephadm处理问题

ceph 分布式存储15以上版本mon报错解决办法


ceph -s
cluster:
    id:   ce68aab8-8f46-11ed-88c0-ac1f6b3a30b9
    health: HEALTH_WARN

            1/3 mons down, quorum gm268-2,gm268-3
            1 pgs not deep-scrubbed in time


解决过程:
查看:
$ ceph orch host ls

HOST   ADDR   LABELS       STATUS

gm268-1gm268-1mon mgr mds         

gm268-2gm268-2mon mgr mds         

gm268-3gm268-3mon mgr mds         

gm268-4gm268-4                     

删除mon 标签
$ ceph orch host label rm gm268-1 mon

Removed label mon from host gm268-1

root@gm268-1 15:15:44 ~

$ ceph orch host ls

HOST   ADDR   LABELS       STATUS

gm268-1gm268-1mgr mds            

gm268-2gm268-2mon mgr mds         


gm268-3gm268-3mon mgr mds             



$ ceph orch apply mon label:mon


Scheduled mon update...



这样mon就被剔除集群了。


mon不在报错:
cluster:
    id:   ce68aab8-8f46-11ed-88c0-ac1f6b3a30b9
    health: HEALTH_WARN
            failed to probe daemons or devices
            1 pgs not deep-scrubbed in time

问题解决。





admin 发表于 2024-10-17 15:32:51

剔除mon之后,会少一个mon,需要添加回来。保证多个mon正常运行:

在标签上标记mon

$ ceph orch host ls
HOST   ADDR   LABELS       STATUS
gm268-1gm268-1mgr mds            
gm268-2gm268-2mon mgr mds         
gm268-3gm268-3mon mgr mds         
gm268-4gm268-4                     
gm268-5gm268-5                     
tp266-1tp266-1                     


$ ceph orch host label add gm268-1 mon
Added label mon to host gm268-1


$ ceph orch host ls
HOST   ADDR   LABELS       STATUS
gm268-1gm268-1mgr mds mon         
gm268-2gm268-2mon mgr mds         
gm268-3gm268-3mon mgr mds         
gm268-4gm268-4                     
gm268-5gm268-5                     
tp266-1tp266-1                     


$ ceph orch apply mon label:mon
Scheduled mon update...



$ ceph orch host ls
HOST   ADDR   LABELS       STATUS
gm268-1gm268-1mgr mds mon         
gm268-2gm268-2mon mgr mds         
gm268-3gm268-3mon mgr mds         
gm268-4gm268-4                     
gm268-5gm268-5                     
tp266-1tp266-1                     


$ ceph orch daemon add mon gm268-1:10.12.1.2
Error EINVAL: name mon.gm268-1 already in use


$ ceph mon add gm268-1 10.12.1.2
adding mon.gm268-1 at



$ ceph mon dump
2024-10-17T21:54:06.014+0800 7f4e6d2f7700 -1 monclient(hunting): handle_auth_bad_method server allowed_methods but i only support
2024-10-17T21:54:06.016+0800 7f4e6caf6700 -1 monclient(hunting): handle_auth_bad_method server allowed_methods but i only support
dumped monmap epoch 11
epoch 11
fsid ce68aab8-8f46-11ed-88c0-ac1f6b3a30b9
last_changed 2024-10-17T13:54:00.781176+0000
created 2023-01-08T11:23:03.268285+0000
min_mon_release 15 (octopus)
0: mon.gm268-2
1: mon.gm268-3
2: mon.gm268-1


root@gm268-1 21:54:06 ~
$






admin 发表于 2024-10-17 16:09:15

cephadm bootstrap --mon-ip 10.12.1.2 --fsid ce68aab8-8f46-11ed-88c0-ac1f6b3a30b9 --allow-overwrite
Verifying podman|docker is present...
Verifying lvm2 is present...
Verifying time synchronization is in place...
Unit chronyd.service is enabled and running
Repeating the final host check...
podman|docker (/usr/bin/podman) is present
systemctl is present
lvcreate is present
Unit chronyd.service is enabled and running
Host looks OK
Cluster fsid: ce68aab8-8f46-11ed-88c0-ac1f6b3a30b9
Verifying IP 10.12.1.2 port 3300 ...
Verifying IP 10.12.1.2 port 6789 ...
Mon IP 10.12.1.2 is in CIDR network 10.12.0.0/15
Pulling container image quay.io/ceph/ceph:v15...

admin 发表于 2024-10-17 21:57:08

后来通过删除/var/lib/ceph
rm -rf/var/lib/ceph/ce68aab8-8f46-11ed-88c0-ac1f6b3a30b9/mon.gm268-1/

再重新添加mon既可以:

ceph orch host label add gm268-1 mon
   

   ceph orchapply monlabel:mon

ceph orch host ls


$ ceph mon add gm268-1 10.12.1.2
adding mon.gm268-1 at


$ ceph mon dump
2024-10-17T21:54:06.014+0800 7f4e6d2f7700 -1 monclient(hunting): handle_auth_bad_method server allowed_methods but i only support
2024-10-17T21:54:06.016+0800 7f4e6caf6700 -1 monclient(hunting): handle_auth_bad_method server allowed_methods but i only support
dumped monmap epoch 11
epoch 11
fsid ce68aab8-8f46-11ed-88c0-ac1f6b3a30b9
last_changed 2024-10-17T13:54:00.781176+0000
created 2023-01-08T11:23:03.268285+0000
min_mon_release 15 (octopus)
0: mon.gm268-2
1: mon.gm268-3
2: mon.gm268-1


$
完成添加mon节点。

admin 发表于 2024-10-18 00:16:54

admin 发表于 2024-10-17 16:09
cephadm bootstrap --mon-ip 10.12.1.2 --fsid ce68aab8-8f46-11ed-88c0-ac1f6b3a30b9 --allow-overwrite
...

Generating a dashboard self-signed certificate...
Creating initial admin user...
Fetching dashboard port number...
Ceph Dashboard is now available at:

             URL: https://gm268-1:8443/
          User: admin
        Password: j2ixndfanu

You can access the Ceph CLI with:

        sudo /usr/sbin/cephadm shell --fsid ce68aab8-8f46-11ed-88c0-ac1f6b3a30b9 -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring

Please consider enabling telemetry to help improve Ceph:

        ceph telemetry on

For more information see:

        https://docs.ceph.com/docs/master/mgr/telemetry/

Bootstrap complete.
页: [1]
查看完整版本: ceph 分布式存储15以上版本mon报错解决办法 使用cephadm处理问题