此版本叢集的系統盤目前并未采用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節點, 類似格式)
報錯:
![](https://img.laitimes.com/img/9ZDMuAjOiMmIsIjOiQnIsISPrdEZwZ1Rh5WNXp1bwNjW1ZUba9VZwlHdsATOfd3bkFGazxCMx8VesATMfhHLlN3XnxCMwEzX0xiRGZkRGZ0Xy9GbvNGLpZTY1EmMZVDUSFTU4VFRR9Fd4VGdsYTMfVmepNHLrJXYtJXZ0F2dvwVZnFWbp1zczV2YvJHctM3cv1Ce-cmbw5CO0QmNllzMiNTYmVjZ5MzM0gjZiVTY0UWMmhTZjZjZw8CX0AzLcdDM5EDMy8CXn9Gbi9CXzV2Zh1WavwVbvNmLvR3YxUjLxM3Lc9CX6MHc0RHaiojIsJye.png)
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
[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