ceph节点系统盘更换

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

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

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

.├─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目录


[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节点, 类似格式)
报错:
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看出)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值