由于多ceph jewel 版本使用的比较多,后来对luminous 的运维中的一些变化有些不适应,这里做一下记录。
1 需要安装mgr服务
ceph-deploy mgr create host-name
2 安装osd 语法差异
#jewel 版本的安装osd的语法是这样的
ceph-deploy --overwrite-conf osd prepare ceph-admin:/dev/vdb1 ceph-node1:/dev/vdb1 ceph-node2:/dev/vdb1
ceph-deploy --overwrite-conf osd activate ceph-admin:/dev/vdb1 ceph-node1:/dev/vdb1 ceph-node2:/dev/vdb1
# luminous 版本的安装osd 的语法是这样的
ceph-deploy osd create --data /dev/sdb ceph-admin
ceph-deploy osd create --data /dev/sdc ceph-node1
ceph-deploy osd create --data /dev/sdd ceph-node2
3 mon,osd,mgr服务的启停
# jewel 版本的服务启动和停止
systemct restart ceph-mon@node-name.service
# luminous 版本的服务启停
systemctl restart ceph-mon.target
systemctl status ceph-osd.target
4 服务启停有时间间隔限制
如果服务的启动后又报错,在日志中显示启动太快。解决办法:
[root@ceph-admin ssh]# vim /etc/systemd/system/ceph-mon.target.wants/ceph-mon\@ceph-admin.service
[Unit]
Description=Ceph cluster monitor daemon
# According to:
# http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget
# these can be removed once ceph-mon will dynamically change network
# configuration.
After=network-online.target local-fs.target time-sync.target
Wants=network-online.target local-fs.target time-sync.target
PartOf=ceph-mon.target
[Service]
LimitNOFILE=1048576
LimitNPROC=1048576
EnvironmentFile=-/etc/sysconfig/ceph
Environment=CLUSTER=ceph
ExecStart=/usr/bin/ceph-mon -f --cluster ${CLUSTER} --id %i --setuser ceph --setgroup ceph
ExecReload=/bin/kill -HUP $MAINPID
PrivateDevices=yes
ProtectHome=true
ProtectSystem=full
PrivateTmp=true
TasksMax=infinity
Restart=on-failure
#StartLimitInterval=30min #把这个时间限制注释掉
StartLimitBurst=5
RestartSec=10
[Install]
WantedBy=ceph-mon.target