本文主要是介绍手动部署 ceph mon (luminous 版),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
#环境
参考 手动部署 ceph 环境说明 (luminous 版)
模板创建脚本
ceph.conf.template
[global]
fsid = $cephuuid
mon initial members = $cephmonhost
mon host = $cephmonipaddr
public network = $cephmonnetwork
cluster network = $cephdatanetwork
auth cluster required = cephx
auth service required = cephx
auth client required = cephx
osd journal size = 2048
filestore xattr use omap = true
osd pool default size = 3
osd pool default min size = 1
osd pool default pg num = $cephpgnum
osd pool default pgp num = $cephpgpnum
osd crush chooseleaf type = 1
[osd]
osd journal = /var/lib/ceph/journal/ceph-\$id/journal <- 这个变量符号需要保留, 因此 \$
osd journal size = 2048
生成 ceph.conf
[root@cephsvr-128040 ceph]# cat gen_ceph_conf.sh
#!/bin/bash
source parameter
eval "cat <<EOF
$(<ceph.conf.template)
EOF
" 2> /dev/null
参考下面执行效果
[root@cephsvr-128040 ceph]# . gen_ceph_conf.sh
[global]
fsid = xxxxxxxx-5d4d-4d3a-a3b2-04e73eff4ccd
mon initial members = cephsvr-128040,cephsvr-128214,cephsvr-128215
mon host = xx.199.128.40,xx.199.128.214,xx.199.128.215
public network = xx.199.128.0/22
cluster network = xxx.30.128.0/21
auth cluster required = cephx
auth service required = cephx
auth client required = cephx
osd journal size = 2048
filestore xattr use omap = true
osd pool default size = 3
osd pool default min size = 1
osd pool default pg num = 1024
osd pool default pgp num = 1024
osd crush chooseleaf type = 1
[osd]
osd journal = /var/lib/ceph/journal/ceph-$id/journal
osd journal size = 2048
说明:
注意, 这里使用到独立的磁盘作为 journal 存放,因此自行修改一下
创建 mon keyring</
这篇关于手动部署 ceph mon (luminous 版)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!