此版本集群的系统盘目前并未采用raid1, 因此出现任何故障, 都是一个头疼的问题.架构
1,安装系统
2,安装软件
请留意版本号. 要和集群保持一致
在目前的架构里, 系统盘不存放数据, 可是须要负责服务及配置的存放. 并且不一样类型的配置至少位于3个节点.
咱们能够从其余节点恢复必要的软件及配置, 并人工启用对应的服务启动项.socket
参考服务启动项
systemctl status
这是一个运行有mon和osd的节点, systemctl status命令的部分结果ide
.├─system-ceph\x2dmon.slice │ └─ceph-mon@ceph-4.service │ └─1701 /usr/bin/ceph-mon -f --cluster ceph --id ceph-4 --setuser ceph --setgroup ceph ├─system-ceph\x2dosd.slice │ ├─ceph-osd@22.service │ │ └─35523 /usr/bin/ceph-osd -f --cluster ceph --id 22 --setuser ceph --setgroup ceph │ ├─ceph-osd@23.service │ │ └─35553 /usr/bin/ceph-osd -f --cluster ceph --id 23 --setuser ceph --setgroup ceph │ ├─ceph-osd@26.service │ │ └─35482 /usr/bin/ceph-osd -f --cluster ceph --id 26 --setuser ceph --setgroup ceph │ ├─ceph-osd@24.service │ │ └─35545 /usr/bin/ceph-osd -f --cluster ceph --id 24 --setuser ceph --setgroup ceph │ ├─ceph-osd@21.service │ │ └─35488 /usr/bin/ceph-osd -f --cluster ceph --id 21 --setuser ceph --setgroup ceph │ └─ceph-osd@25.service │ └─35356 /usr/bin/ceph-osd -f --cluster ceph --id 25 --setuser ceph --setgroup ceph
systemd目录code
[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 ceph-mon@ceph-4.service -> /usr/lib/systemd/system/ceph-mon@.service /etc/systemd/system/ceph-osd.target.wants: total 0 lrwxrwxrwx 1 root root 41 Jul 6 2018 ceph-osd@21.service -> /usr/lib/systemd/system/ceph-osd@.service lrwxrwxrwx 1 root root 41 Jul 6 2018 ceph-osd@22.service -> /usr/lib/systemd/system/ceph-osd@.service lrwxrwxrwx 1 root root 41 Jul 6 2018 ceph-osd@23.service -> /usr/lib/systemd/system/ceph-osd@.service lrwxrwxrwx 1 root root 41 Jul 6 2018 ceph-osd@24.service -> /usr/lib/systemd/system/ceph-osd@.service lrwxrwxrwx 1 root root 41 Jul 6 2018 ceph-osd@25.service -> /usr/lib/systemd/system/ceph-osd@.service lrwxrwxrwx 1 root root 41 Jul 6 2018 ceph-osd@26.service -> /usr/lib/systemd/system/ceph-osd@.service /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节点, 相似格式)
报错:blog
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,将其余节点上对应目录下全部文件复制过来()ip
[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节点看吧.get
启用ceph-osd
这个看节点数量而而定
至少挂载点的一批目录是须要人工建立的.system enable ceph-osd@(这里的ID参考其余的osd节点, 相似格式, 所有osd可以使用ceph osd tree看出)
it