在极端情况下,如数据中心断电,造成 Ceph 存储集群全局宕机,可以按照本节所示流程进行 Ceph 集群上电恢复操作。
# ps-ef | grep ntp
# date
# ntpq -p
# ps -ef | grep ceph
noout flag(s) set
# ceph -s
# ceph osd tree
stopping w/out rebalancing,命令如下:
# ceph osd unset noout
# ceph -w
使用 ceph-w 可查看集群运作输出,同步完毕后集群 health 应为HEALTH_OK 状态。
ping ceph monitor server,检查 monitor server 可以 ping 通。ceph -s 状态为HEALTH_OK ceph osd tree OSD 状态皆为UP ceph -s : 确认 ceph cluster statusceph -w : 查看集群运作输出ceph osd tree : 查看ceph cluster上osd排列及状态start ceph-all : 启动 所有 ceph servicestart ceph-osd-all : 启动 所有 osd servicestart ceph-mon-all : 启动 所有 mon servicestart ceph-osd id={id} : 启动指定 osd id servicestart ceph-mon id={hostname} : 启动指定 ceph monitor hostceph osd set noout : ceph stopping w/out rebalancingceph osd unset noout : 解除ceph stopping w/out rebalancing