在极端情况下,如数据中心断电,造成 Ceph 存储集群全局宕机,可以按照本节所示流程进行 Ceph 集群上电恢复操作。
4.1 手动上电执行步骤
-  如为 Ceph 集群上电,monitor server 应最先上电;集群上电前确认使用 Ceph 之前端作业服务已停止。 
-  使用 IPMI 或于设备前手动进行上电。 
-  确认 NTP 服务及系统时间已同步,命令如下: # ps-ef | grep ntp# date# ntpq -p
-  登入上电之 ceph server 确认 ceph service 已正常运行,命令如下: # ps -ef | grep ceph
-  登入集群 monitor server 查看状态,OSD 全都 up 集群仍为 noout flag(s) set# ceph -s# ceph osd tree
-  登入 monitor server 解除 stopping w/out rebalancing,命令如下:# ceph osd unset noout# ceph -w使用 ceph-w可查看集群运作输出,同步完毕后集群 health 应为HEALTH_OK状态。
4.2 恢复后检查步骤
-  确认设备上电状态,以 IPMI 或 于设备前确认电源为开启上电状态。 
-  ping ceph monitor server,检查 monitor server 可以 ping 通。
-  系统时间和校时服务器时间同步。 
-  ceph -s状态为HEALTH_OK
-  ceph osd treeOSD 状态皆为UP
4.3 恢复使用指令及其说明
-  ceph -s: 确认 ceph cluster status
-  ceph -w: 查看集群运作输出
-  ceph osd tree: 查看ceph cluster上osd排列及状态
-  start ceph-all: 启动 所有 ceph service
-  start ceph-osd-all: 启动 所有 osd service
-  start ceph-mon-all: 启动 所有 mon service
-  start ceph-osd id={id}: 启动指定 osd id service
-  start ceph-mon id={hostname}: 启动指定 ceph monitor host
-  ceph osd set noout: ceph stopping w/out rebalancing
-  ceph osd unset noout: 解除ceph stopping w/out rebalancing