标题:
手动安装ceph和使用(5)
[打印本页]
作者:
look_w
时间:
2019-5-18 11:05
标题:
手动安装ceph和使用(5)
如果报错:
Error in sys.exitfunc
解决方法
网上收集到一个解决方式, 添加环境变量,在admin节点的shell中运行命令后重新运行deploy命令,不过我运行了感觉没生效
export CEPH_DEPLOY_TEST=YES
sudo ceph-deploy new ceph1 ceph2 ceph3
如果在当前目录使用命令ls看到三个配置文件,则可以无视这个错误继续安装。
[zzq@localhost myceph]$ ls
ceph.conf ceph-deploy-ceph.log ceph.mon.keyring
[zzq@localhost myceph]$
修改osd的副本数
将osd pool default size = 2添加至末尾
sudo vi /etc/ceph.conf
输入内容:
osd pool default size = 2
配置初始 monitor(s)、并收集所有密钥
sudo ceph-deploy mon create-initial
正确运行输出如下:
[zzq@localhost myceph]$ sudo ceph-deploy mon create-initial
[sudo] password for zzq:
[ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf
[ceph_deploy.cli][INFO ] Invoked (1.5.37): /usr/bin/ceph-deploy mon create-initial
[ceph_deploy.cli][INFO ] ceph-deploy options:
[ceph_deploy.cli][INFO ] username : None
[ceph_deploy.cli][INFO ] verbose : False
[ceph_deploy.cli][INFO ] overwrite_conf : False
[ceph_deploy.cli][INFO ] subcommand : create-initial
[ceph_deploy.cli][INFO ] quiet : False
[ceph_deploy.cli][INFO ] cd_conf : <ceph_deploy.conf.cephdeploy.Conf instance at 0x7f2a6bd232d8>
[ceph_deploy.cli][INFO ] cluster : ceph
[ceph_deploy.cli][INFO ] func : <function mon at 0x7f2a6bd15578>
[ceph_deploy.cli][INFO ] ceph_conf : None
[ceph_deploy.cli][INFO ] default_release : False
[ceph_deploy.cli][INFO ] keyrings : None
[ceph_deploy.mon][DEBUG ] Deploying mon, cluster ceph hosts ceph1 ceph2 ceph3
[ceph_deploy.mon][DEBUG ] detecting platform for host ceph1 ...
[ceph1][DEBUG ] connected to host: ceph1
[ceph1][DEBUG ] detect platform information from remote host
[ceph1][DEBUG ] detect machine type
[ceph1][DEBUG ] find the location of an executable
[ceph_deploy.mon][INFO ] distro info: CentOS 6.9 Final
[ceph1][DEBUG ] determining if provided host has same hostname in remote
[ceph1][DEBUG ] get remote short hostname
[ceph1][DEBUG ] deploying mon to ceph1
[ceph1][DEBUG ] get remote short hostname
[ceph1][DEBUG ] remote hostname: ceph1
[ceph1][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf
[ceph1][DEBUG ] create the mon path if it does not exist
[ceph1][DEBUG ] checking for done path: /var/lib/ceph/mon/ceph-ceph1/done
[ceph1][DEBUG ] create a done file to avoid re-doing the mon deployment
[ceph1][DEBUG ] create the init path if it does not exist
[ceph1][DEBUG ] locating the `service` executable...
[ceph1][INFO ] Running command: /sbin/service ceph -c /etc/ceph/ceph.conf start mon.ceph1
[ceph1][DEBUG ] === mon.ceph1 ===
[ceph1][DEBUG ] Starting Ceph mon.ceph1 on ceph1...already running
[ceph1][INFO ] Running command: chkconfig ceph on
[ceph1][INFO ] Running command: ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.ceph1.asok mon_status
[ceph1][DEBUG ] ********************************************************************************
[ceph1][DEBUG ] status for monitor: mon.ceph1
[ceph1][DEBUG ] {
[ceph1][DEBUG ] "election_epoch": 0,
[ceph1][DEBUG ] "extra_probe_peers": [
[ceph1][DEBUG ] "192.168.199.82:6789/0",
[ceph1][DEBUG ] "192.168.199.83:6789/0"
[ceph1][DEBUG ] ],
[ceph1][DEBUG ] "monmap": {
[ceph1][DEBUG ] "created": "0.000000",
[ceph1][DEBUG ] "epoch": 0,
[ceph1][DEBUG ] "fsid": "93cfef7e-98a5-440f-af59-1a950e283b74",
[ceph1][DEBUG ] "modified": "0.000000",
[ceph1][DEBUG ] "mons": [
[ceph1][DEBUG ] {
[ceph1][DEBUG ] "addr": "192.168.199.81:6789/0",
[ceph1][DEBUG ] "name": "ceph1",
[ceph1][DEBUG ] "rank": 0
[ceph1][DEBUG ] },
[ceph1][DEBUG ] {
[ceph1][DEBUG ] "addr": "0.0.0.0:0/1",
[ceph1][DEBUG ] "name": "ceph2",
[ceph1][DEBUG ] "rank": 1
[ceph1][DEBUG ] },
[ceph1][DEBUG ] {
[ceph1][DEBUG ] "addr": "0.0.0.0:0/2",
[ceph1][DEBUG ] "name": "ceph3",
[ceph1][DEBUG ] "rank": 2
[ceph1][DEBUG ] }
[ceph1][DEBUG ] ]
[ceph1][DEBUG ] },
[ceph1][DEBUG ] "name": "ceph1",
[ceph1][DEBUG ] "outside_quorum": [
[ceph1][DEBUG ] "ceph1"
[ceph1][DEBUG ] ],
[ceph1][DEBUG ] "quorum": [],
[ceph1][DEBUG ] "rank": 0,
[ceph1][DEBUG ] "state": "probing",
[ceph1][DEBUG ] "sync_provider": []
[ceph1][DEBUG ] }
[ceph1][DEBUG ] ********************************************************************************
[ceph1][INFO ] monitor: mon.ceph1 is running
[ceph1][INFO ] Running command: ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.ceph1.asok mon_status
[ceph_deploy.mon][DEBUG ] detecting platform for host ceph2 ...
[ceph2][DEBUG ] connected to host: ceph2
[ceph2][DEBUG ] detect platform information from remote host
[ceph2][DEBUG ] detect machine type
[ceph2][DEBUG ] find the location of an executable
[ceph_deploy.mon][INFO ] distro info: CentOS 6.9 Final
[ceph2][DEBUG ] determining if provided host has same hostname in remote
[ceph2][DEBUG ] get remote short hostname
[ceph2][DEBUG ] deploying mon to ceph2
[ceph2][DEBUG ] get remote short hostname
[ceph2][DEBUG ] remote hostname: ceph2
[ceph2][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf
[ceph2][DEBUG ] create the mon path if it does not exist
[ceph2][DEBUG ] checking for done path: /var/lib/ceph/mon/ceph-ceph2/done
[ceph2][DEBUG ] create a done file to avoid re-doing the mon deployment
[ceph2][DEBUG ] create the init path if it does not exist
[ceph2][DEBUG ] locating the `service` executable...
[ceph2][INFO ] Running command: /sbin/service ceph -c /etc/ceph/ceph.conf start mon.ceph2
[ceph2][DEBUG ] === mon.ceph2 ===
[ceph2][DEBUG ] Starting Ceph mon.ceph2 on ceph2...
[ceph2][DEBUG ] Starting ceph-create-keys on ceph2...
[ceph2][INFO ] Running command: chkconfig ceph on
[ceph2][INFO ] Running command: ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.ceph2.asok mon_status
[ceph2][DEBUG ] ********************************************************************************
[ceph2][DEBUG ] status for monitor: mon.ceph2
[ceph2][DEBUG ] {
[ceph2][DEBUG ] "election_epoch": 1,
[ceph2][DEBUG ] "extra_probe_peers": [
[ceph2][DEBUG ] "192.168.199.81:6789/0",
[ceph2][DEBUG ] "192.168.199.83:6789/0"
[ceph2][DEBUG ] ],
[ceph2][DEBUG ] "monmap": {
[ceph2][DEBUG ] "created": "0.000000",
[ceph2][DEBUG ] "epoch": 0,
[ceph2][DEBUG ] "fsid": "93cfef7e-98a5-440f-af59-1a950e283b74",
[ceph2][DEBUG ] "modified": "0.000000",
[ceph2][DEBUG ] "mons": [
[ceph2][DEBUG ] {
[ceph2][DEBUG ] "addr": "192.168.199.81:6789/0",
[ceph2][DEBUG ] "name": "ceph1",
[ceph2][DEBUG ] "rank": 0
[ceph2][DEBUG ] },
[ceph2][DEBUG ] {
[ceph2][DEBUG ] "addr": "192.168.199.82:6789/0",
[ceph2][DEBUG ] "name": "ceph2",
[ceph2][DEBUG ] "rank": 1
[ceph2][DEBUG ] },
[ceph2][DEBUG ] {
[ceph2][DEBUG ] "addr": "0.0.0.0:0/2",
[ceph2][DEBUG ] "name": "ceph3",
[ceph2][DEBUG ] "rank": 2
[ceph2][DEBUG ] }
[ceph2][DEBUG ] ]
[ceph2][DEBUG ] },
[ceph2][DEBUG ] "name": "ceph2",
[ceph2][DEBUG ] "outside_quorum": [],
[ceph2][DEBUG ] "quorum": [],
[ceph2][DEBUG ] "rank": 1,
[ceph2][DEBUG ] "state": "electing",
[ceph2][DEBUG ] "sync_provider": []
[ceph2][DEBUG ] }
[ceph2][DEBUG ] ********************************************************************************
[ceph2][INFO ] monitor: mon.ceph2 is running
[ceph2][INFO ] Running command: ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.ceph2.asok mon_status
[ceph_deploy.mon][DEBUG ] detecting platform for host ceph3 ...
[ceph3][DEBUG ] connected to host: ceph3
[ceph3][DEBUG ] detect platform information from remote host
[ceph3][DEBUG ] detect machine type
[ceph3][DEBUG ] find the location of an executable
[ceph_deploy.mon][INFO ] distro info: CentOS 6.9 Final
[ceph3][DEBUG ] determining if provided host has same hostname in remote
[ceph3][DEBUG ] get remote short hostname
[ceph3][DEBUG ] deploying mon to ceph3
[ceph3][DEBUG ] get remote short hostname
[ceph3][DEBUG ] remote hostname: ceph3
[ceph3][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf
[ceph3][DEBUG ] create the mon path if it does not exist
[ceph3][DEBUG ] checking for done path: /var/lib/ceph/mon/ceph-ceph3/done
[ceph3][DEBUG ] create a done file to avoid re-doing the mon deployment
[ceph3][DEBUG ] create the init path if it does not exist
[ceph3][DEBUG ] locating the `service` executable...
[ceph3][INFO ] Running command: /sbin/service ceph -c /etc/ceph/ceph.conf start mon.ceph3
[ceph3][DEBUG ] === mon.ceph3 ===
[ceph3][DEBUG ] Starting Ceph mon.ceph3 on ceph3...
[ceph3][DEBUG ] Starting ceph-create-keys on ceph3...
[ceph3][INFO ] Running command: chkconfig ceph on
[ceph3][INFO ] Running command: ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.ceph3.as
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/)
Powered by Discuz! 7.0.0