Ceph 运维手册
第一部分:常用操作 - 12. 日志和调试 - 《Ceph 运维手册》 - 书栈网 · BookStack
分布式存储ceph运维操作
(摘抄自:https://www.cnblogs.com/mm2021/p/15121746.html)
如果是在admin节点修改的ceph.conf,想推送到所有其他节点,则需要执行下述命令
ceph-deploy --overwrite-conf config push mon01 mon02 mon03 osd01 osd02 osd03
修改完毕配置文件后需要重启服务生效
@@!!!下述操作均需要在具体运行服务的那个节点上运行,而不是admin节点!!! @@
1.方式一
在各具体节点执行下行命令,重启节点上的所有ceph守护进程
systemctl restart ceph.target
2.方式二
在各具体节点执行下行命令,按类型重启相应的守护进程
# 1.重启mgr守护进程
systemctl restart ceph-mgr.target
# 2.重启mds守护进程
systemctl restart ceph-mds.target
# 3.重启rgw守护进程
systemctl restart ceph-radosgw.target
# 4.重启mon守护进程
systemctl restart ceph-mon.target
# 5.重启osd守护进程
登录到osd01节点上,该节点上运行有三个osd daemon进程osd.0、osd.l、osd.2
# 5.1重启所有的osd daemoon
systemctl restart ceph-osd.target
# 5.2挨个重启
syste
建议大家遇到集群状态发现报错或警告后,使用 ceph health detail命令 来查看到系统给出的处理建议。
Ceph错误记录
mds is damaged
mds.0 is damaged_discsthnew:https://blog.csdn.net/mailjoin/article/details/79694965
强制恢复(注意会丢数据,仅供开发测试时候用)
cephfs-journal-tool journal reset
ceph mds repaired 0
unable to open OSD superblock on /var/lib/ceph/osd/ceph-45
key: use_rdma, val: 1
default pool attr 0, nr_hugepages 0, no neet set hugepages
2021-03-28 21:46:07.548765 7f904d555ec0 2818102 20 ERROR bluestore(/var/lib/ceph/osd/ceph-45/block) _read_bdev_label failed to open /var/lib/ceph/osd/ceph-45/block: (2) No such file or directory
2021-03-28 21:46:07.548788 7f904d555ec0 2818102 20 ERROR ** ERROR: unable to open OSD superblock on /var/lib/ceph/osd/ceph-45: (2) No such file or directory
OSD 号不对,ceph osd tree 查看
[root@rdma61 osd]# ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-10 0 root maintain
-9 123.71407 root hddpool
-11 123.71407 rack rack.hddpool
-15 36.38649 host rdma61.hddpool
3 hdd 7.27730 osd.3 down 1.00000 1.00000
6 hdd 7.27730 osd.6 down 1.00000 1.00000
10 hdd 7.27730 osd.10 down 1.00000 1.00000
13 hdd 7.27730 osd.13 down 1.00000 1.00000
16 hdd 7.27730 osd.16 down 1.00000 1.00000
-6 43.66379 host rdma63.hddpool
1 hdd 7.27730 osd.1 down 1.00000 1.00000
4 hdd 7.27730 osd.4 down 1.00000 1.00000
7 hdd 7.27730 osd.7 down 1.00000 1.00000
9 hdd 7.27730 osd.9 down 1.00000 1.00000
12 hdd 7.27730 osd.12 down 1.00000 1.00000
15 hdd 7.27730 osd.15 down 1.00000 1.00000
-3 43.66379 host rdma64.hddpool
2 hdd 7.27730 osd.2 down 1.00000 1.00000
5 hdd 7.27730 osd.5 down 1.00000 1.00000
8 hdd 7.27730 osd.8 down 1.00000 1.00000
11 hdd 7.27730 osd.11 down 1.00000 1.00000
14 hdd 7.27730 osd.14 down 1.00000 1.00000
17 hdd 7.27730 osd.17 down 1.00000 1.00000
-5 10.47839 root ssd