此版本集群的系统盘目前并未采用raid1, 所以出现任何故障, 都是一个头疼的问题.

1,安装系统
2,安装软件
请留意版本号. 要和集群保持一致
在目前的架构里, 系统盘不存放数据, 但是需要负责服务及配置的存放. 而且不同类型的配置至少位于3个节点.
我们可以从其他节点恢复必要的软件及配置, 并人工启用对应的服务启动项.

参考服务启动项
systemctl status
这是一个运行有mon和osd的节点, systemctl status命令的部分结果

.├─system-ceph\x2dmon.slice
│ └─[email protected]
│ └─1701 /usr/bin/ceph-mon -f --cluster ceph --id ceph-4 --setuser ceph --setgroup ceph
├─system-ceph\x2dosd.slice
│ ├─[email protected]
│ │ └─35523 /usr/bin/ceph-osd -f --cluster ceph --id 22 --setuser ceph --setgroup ceph
│ ├─[email protected]
│ │ └─35553 /usr/bin/ceph-osd -f --cluster ceph --id 23 --setuser ceph --setgroup ceph
│ ├─[email protected]
│ │ └─35482 /usr/bin/ceph-osd -f --cluster ceph --id 26 --setuser ceph --setgroup ceph
│ ├─[email protected]
│ │ └─35545 /usr/bin/ceph-osd -f --cluster ceph --id 24 --setuser ceph --setgroup ceph
│ ├─[email protected]
│ │ └─35488 /usr/bin/ceph-osd -f --cluster ceph --id 21 --setuser ceph --setgroup ceph
│ └─[email protected]
│ └─35356 /usr/bin/ceph-osd -f --cluster ceph --id 25 --setuser ceph --setgroup ceph
systemd目录

[root@ceph-4 ~]# ls -l /etc/systemd/system/ceph*
/etc/systemd/system/ceph-mon.target.wants:
total 0
lrwxrwxrwx 1 root root 41 Jun 21 2016 [email protected] -> /usr/lib/systemd/system/[email protected]

/etc/systemd/system/ceph-osd.target.wants:
total 0
lrwxrwxrwx 1 root root 41 Jul 6 2018 [email protected] -> /usr/lib/systemd/system/[email protected]
lrwxrwxrwx 1 root root 41 Jul 6 2018 [email protected] -> /usr/lib/systemd/system/[email protected]
lrwxrwxrwx 1 root root 41 Jul 6 2018 [email protected] -> /usr/lib/systemd/system/[email protected]
lrwxrwxrwx 1 root root 41 Jul 6 2018 [email protected] -> /usr/lib/systemd/system/[email protected]
lrwxrwxrwx 1 root root 41 Jul 6 2018 [email protected] -> /usr/lib/systemd/system/[email protected]
lrwxrwxrwx 1 root root 41 Jul 6 2018 [email protected] -> /usr/lib/systemd/system/[email protected]

/etc/systemd/system/ceph.target.wants:
total 0
lrwxrwxrwx 1 root root 39 May 24 2016 ceph-mds.target -> /usr/lib/systemd/system/ceph-mds.target
lrwxrwxrwx 1 root root 39 May 24 2016 ceph-mon.target -> /usr/lib/systemd/system/ceph-mon.target
lrwxrwxrwx 1 root root 39 May 24 2016 ceph-osd.target -> /usr/lib/systemd/system/ceph-osd.target
lrwxrwxrwx 1 root root 43 May 24 2016 ceph-radosgw.target -> /usr/lib/systemd/system/ceph-radosgw.target
参考其他ceph节点配置好这些服务。
启用mon
system enable ceph-mon@(这里的ID参考其他的mon节点, 类似格式)
报错:
ceph节点系统盘更换

Jan 29 12:19:33 ceph-4.os ceph-create-keys[41389]: admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
Jan 29 12:19:33 ceph-4.os ceph-create-keys[41389]: INFO:ceph-create-keys:ceph-mon admin socket not ready yet.
Jan 29 12:19:34 ceph-4.os ceph-create-keys[41389]: admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
Jan 29 12:19:34 ceph-4.os ceph-create-keys[41389]: INFO:ceph-create-keys:ceph-mon admin socket not ready yet.
Jan 29 12:19:35 ceph-4.os ceph-create-keys[41389]: admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
Jan 29 12:19:35 ceph-4.os ceph-create-keys[41389]: INFO:ceph-create-keys:ceph-mon admin socket not ready yet.
Jan 29 12:19:36 ceph-4.os ceph-create-keys[41389]: admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
Jan 29 12:19:36 ceph-4.os ceph-create-keys[41389]: INFO:ceph-create-keys:ceph-mon admin socket not ready yet.
Jan 29 12:19:37 ceph-4.os ceph-create-keys[41389]: admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
Jan 29 12:19:37 ceph-4.os ceph-create-keys[41389]: INFO:ceph-create-keys:ceph-mon admin socket not ready yet.
Jan 29 12:19:38 ceph-4.os ceph-create-keys[41389]: admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
Jan 29 12:19:38 ceph-4.os ceph-create-keys[41389]: INFO:ceph-create-keys:ceph-mon admin socket not ready yet
解决:
1,在/var/lib/ceph/mon下创建目录ceph-ceph- (如果是ceph-4,号就为4)
2,将其他节点上对应目录下所有文件复制过来()

[root@ceph-5 ceph-ceph-5]# ll
total 60
-rw-r--r-- 1 ceph ceph 0 Jun 21 2016 done
-rw------- 1 ceph ceph 77 Jun 21 2016 keyring
drwxr-xr-x 2 ceph ceph 53248 Jan 29 12:31 store.db
-rw-r--r-- 1 ceph ceph 0 Jun 21 2016 systemd
[root@ceph-5 ceph-ceph-5]# pwd
/var/lib/ceph/mon/ceph-ceph-5
启用mgr
这一版还没有mgr. 就先不写了.
后期对比其他mgr节点看吧.

启用ceph-osd
这个看节点数量而而定
至少挂载点的一批目录是需要人工创建的.
system enable ceph-osd@(这里的ID参考其他的osd节点, 类似格式, 全部osd可使用ceph osd tree看出)