Ceph集群搭建记录
环境准备
基础环境
node00 | 192.168.247.144 | node00 |
---|---|---|
node01 | 192.168.247.135 | node01 |
node02 | 192.168.247.143 | node02 |
vmare在分配IP没有连续,没有关系继续吧
配置免密登录
- 修改主机名称
hostnamectl set-hostname node00
hostnamectl set-hostname node01
hostnamectl set-hostname node02
- 编辑hosts文件
[root@linux30 ~]# vi /etc/hosts
192.168.247.144 node00
192.168.247.135 node01
192.168.247.143 node02
- 官方建议不用系统内置用户, 创建名为ceph_user用户, 密码也设为123456:
useradd -d /home/ceph_user -m ceph_user
passwd ceph_user
# 设置root 权限
echo "ceph_user ALL = (root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/ceph_user
sudo chmod 0440 /etc/sudoers.d/ceph_user
- 生成密钥:切换用户: su ceph_user 执行ssh-keygen,一直按默认提示点击生成RSA密钥信息。
- 分发密钥至各机器节点
ssh-copy-id ceph_user@node00
ssh-copy-id ceph_user@node01
ssh-copy-id ceph_user@node02
- 修改管理节点上的 ~/.ssh/config 文件, 简化SSH远程连接时的输入信息:管理节点是会有root和ceph_user多个用户, ssh远程连接默认会以当前用户身份进行登陆, 如果我们是root身份进行远程连接, 还是需要输入密码, 我们想简化, 该怎么处理?
su root
vim /root/.ssh/config
复制一下内容即可
Host node00
Hostname node00
User ceph_user
Host node01
Hostname node01
User ceph_user
Host node02
Hostname node02
User ceph_user
注意修改文件权限, 不能采用777最大权限:
chmod 600 ~/.ssh/config
NTP时间工具同步
# 下载
yum install ntp ntpdate ntp-doc -y
# 确保时区是正确, 设置开机启动:
systemctl enable ntpd
# 将时间每隔1小时自动校准同步。编辑 vi /etc/rc.d/rc.local 追加:
echo "/usr/sbin/ntpdate ntp1.aliyun.com > /dev/null 2>&1; /sbin/hwclock -w" >> /etc/rc.d/rc.local
# 配置定时任务, 执行crontab -e 加入
crontab -e 0 */1 * * * ntpdate ntp1.aliyun.com > /dev/null 2>&1; /sbin/hwclock -w
ceph的镜像加速源头设置
rpm -ivh https://mirrors.aliyun.com/ceph/rpm-mimic/el7/noarch/ceph-release-1-1.el7.noarch.rpm
yum install epel-release
yum install ceph-deploy python-setuptools python2-subprocess32
并配置镜像加速源
echo '
[Ceph]
name=Ceph packages for $basearch
baseurl=https://mirrors.tuna.tsinghua.edu.cn/ceph/rpm-mimic/el7/x86_64/
enabled=1
gpgcheck=1
type=rpm-md
gpgkey=https://download.ceph.com/keys/release.asc
[Ceph-noarch]
name=Ceph noarch packages
# 官方源
#baseurl=http://download.ceph.com/rpm-mimic/el7/noarch
# 清华源
baseurl=https://mirrors.tuna.tsinghua.edu.cn/ceph/rpm-mimic/el7/noarch/
enabled=1
gpgcheck=1
type=rpm-md
gpgkey=https://download.ceph.com/keys/release.asc
[ceph-source]
name=Ceph source packages
baseurl=https://mirrors.tuna.tsinghua.edu.cn/ceph/rpm-mimic/el7/SRPMS/
enabled=1
gpgcheck=1
type=rpm-md
gpgkey=https://download.ceph.com/keys/release.asc' > /etc/yum.repos.d/ceph.repo
- 开放端口, 非生产环境, 可以直接禁用防火墙:
systemctl stop firewalld.service
systemctl disable firewalld.service
- SELinux设为禁用:
setenforce 0
永久生效:编辑 vi /etc/selinux/config修改:
SELINUX=disabled
正式安装
- ceph-deploy 工具安装;主节点安装:
yum update && yum -y install ceph ceph-deploy
也可通过如下方式安装:
- 创建目录
mkdir -p /opt/ceph/ceph-cluster && cd /opt/ceph/ceph-cluster
- 创建集群;
ceph-deploy new node00 node01 node02
会生成配置文件;
vi /opt/ceph/ceph-cluster/ceph.conf
[global]
fsid = 7d75db39-d457-4764-b7d2-1b48645b2781
mon_initial_members = linux30, linux31, linux32
mon_host = 192.168.10.30,192.168.10.31,192.168.10.32
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
# 公网网络
public network = 192.168.247.100/24
# 设置pool池默认分配数量 默认副本数为3
osd pool default size = 2
# 容忍更多的时钟误差
mon clock drift allowed = 2
mon clock drift warn backoff = 30
# 允许删除pool
mon_allow_pool_delete = true
[mgr]
# 开启WEB仪表盘
mgr modules = dashboard
public network
是其公网IP(虚拟机是vmnet8的网卡IP)
- 节点部署
ceph-deploy install node00 node01 node02 --no-adjust-repos
--no-adjust-repos
使用该命令可以实现加速效果;并且不改变镜像源。
- 初始monitor信息:
ceph-deploy mon create-initial
## ceph-deploy --overwrite-conf mon create-initial
执行完之后,本地目录下会生成若干keyring结尾的密钥文件;如下图:
- 同步管理信息
ceph-deploy admin node00 node01 node02
[root@node00 ceph-cluster]# ceph-deploy admin node00 node01 node02
[ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf
[ceph_deploy.cli][INFO ] Invoked (2.0.1): /usr/bin/ceph-deploy admin node00 node01 node02
[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 ] quiet : False
[ceph_deploy.cli][INFO ] cd_conf : <ceph_deploy.conf.cephdeploy.Conf instance at 0x7f4b18579878>
[ceph_deploy.cli][INFO ] cluster : ceph
[ceph_deploy.cli][INFO ] client : ['node00', 'node01', 'node02']
[ceph_deploy.cli][INFO ] func : <function admin at 0x7f4b18e12230>
[ceph_deploy.cli][INFO ] ceph_conf : None
[ceph_deploy.cli][INFO ] default_release : False
[ceph_deploy.admin][DEBUG ] Pushing admin keys and conf to node00
[node00][DEBUG ] connected to host: node00
[node00][DEBUG ] detect platform information from remote host
[node00][DEBUG ] detect machine type
[node00][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf
[ceph_deploy.admin][DEBUG ] Pushing admin keys and conf to node01
[node01][DEBUG ] connection detected need for sudo
[node01][DEBUG ] connected to host: node01
[node01][DEBUG ] detect platform information from remote host
[node01][DEBUG ] detect machine type
[node01][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf
[ceph_deploy.admin][DEBUG ] Pushing admin keys and conf to node02
[node02][DEBUG ] connection detected need for sudo
[node02][DEBUG ] connected to host: node02
[node02][DEBUG ] detect platform information from remote host
[node02][DEBUG ] detect machine type
[node02][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf
[root@node00 ceph-cluster]# vim /etc/ceph/
ceph.client.admin.keyring rbdmap tmphCOe3j
ceph.conf tmp4R_f2T
[root@node00 ceph-cluster]# vim /etc/ceph/
ceph.client.admin.keyring rbdmap tmphCOe3j
ceph.conf tmp4R_f2T
[root@node00 ceph-cluster]# vim /etc/ceph/ceph.conf
[root@node00 ceph-cluster]# clear
[root@node00 ceph-cluster]# ceph-deploy mgr create node00 node01 node02
[ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf
[ceph_deploy.cli][INFO ] Invoked (2.0.1): /usr/bin/ceph-deploy mgr create node00 node01 node02
[ceph_deploy.cli][INFO ] ceph-deploy options:
[ceph_deploy.cli][INFO ] username : None
[ceph_deploy.cli][INFO ] verbose : False
[ceph_deploy.cli][INFO ] mgr : [('node00', 'node00'), ('node01', 'node01'), ('node02', 'node02')]
[ceph_deploy.cli][INFO ] overwrite_conf : False
[ceph_deploy.cli][INFO ] subcommand : create
[ceph_deploy.cli][INFO ] quiet : False
[ceph_deploy.cli][INFO ] cd_conf : <ceph_deploy.conf.cephdeploy.Conf instance at 0x7fcff90d9b00>
[ceph_deploy.cli][INFO ] cluster : ceph
[ceph_deploy.cli][INFO ] func : <function mgr at 0x7fcff99c9140>
[ceph_deploy.cli][INFO ] ceph_conf : None
[ceph_deploy.cli][INFO ] default_release : False
[ceph_deploy.mgr][DEBUG ] Deploying mgr, cluster ceph hosts node00:node00 node01:node01 node02:node02
[node00][DEBUG ] connected to host: node00
[node00][DEBUG ] detect platform information from remote host
[node00][DEBUG ] detect machine type
[ceph_deploy.mgr][INFO ] Distro info: CentOS Linux 7.9.2009 Core
[ceph_deploy.mgr][DEBUG ] remote host will use systemd
[ceph_deploy.mgr][DEBUG ] deploying mgr bootstrap to node00
[node00][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf
[node00][WARNIN] mgr keyring does not exist yet, creating one
[node00][DEBUG ] create a keyring file
[node00][DEBUG ] create path recursively if it doesn't exist
[node00][INFO ] Running command: ceph --cluster ceph --name client.bootstrap-mgr --keyring /var/lib/ceph/bootstrap-mgr/ceph.keyring auth get-or-create mgr.node00 mon allow profile mgr osd allow * mds allow * -o /var/lib/ceph/mgr/ceph-node00/keyring
[node00][INFO ] Running command: systemctl enable ceph-mgr@node00
[node00][WARNIN] Created symlink from /etc/systemd/system/ceph-mgr.target.wants/ceph-mgr@node00.service to /usr/lib/systemd/system/ceph-mgr@.service.
[node00][INFO ] Running command: systemctl start ceph-mgr@node00
[node00][INFO ] Running command: systemctl enable ceph.target
[node01][DEBUG ] connection detected need for sudo
[node01][DEBUG ] connected to host: node01
[node01][DEBUG ] detect platform information from remote host
[node01][DEBUG ] detect machine type
[ceph_deploy.mgr][INFO ] Distro info: CentOS Linux 7.9.2009 Core
[ceph_deploy.mgr][DEBUG ] remote host will use systemd
[ceph_deploy.mgr][DEBUG ] deploying mgr bootstrap to node01
[node01][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf
[node01][WARNIN] mgr keyring does not exist yet, creating one
[node01][DEBUG ] create a keyring file
[node01][DEBUG ] create path recursively if it doesn't exist
[node01][INFO ] Running command: sudo ceph --cluster ceph --name client.bootstrap-mgr --keyring /var/lib/ceph/bootstrap-mgr/ceph.keyring auth get-or-create mgr.node01 mon allow profile mgr osd allow * mds allow * -o /var/lib/ceph/mgr/ceph-node01/keyring
[node01][INFO ] Running command: sudo systemctl enable ceph-mgr@node01
[node01][WARNIN] Created symlink from /etc/systemd/system/ceph-mgr.target.wants/ceph-mgr@node01.service to /usr/lib/systemd/system/ceph-mgr@.service.
[node01][INFO ] Running command: sudo systemctl start ceph-mgr@node01
[node01][INFO ] Running command: sudo systemctl enable ceph.target
[node02][DEBUG ] connection detected need for sudo
[node02][DEBUG ] connected to host: node02
[node02][DEBUG ] detect platform information from remote host
[node02][DEBUG ] detect machine type
[ceph_deploy.mgr][INFO ] Distro info: CentOS Linux 7.9.2009 Core
[ceph_deploy.mgr][DEBUG ] remote host will use systemd
[ceph_deploy.mgr][DEBUG ] deploying mgr bootstrap to node02
[node02][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf
[node02][WARNIN] mgr keyring does not exist yet, creating one
[node02][DEBUG ] create a keyring file
[node02][DEBUG ] create path recursively if it doesn't exist
[node02][INFO ] Running command: sudo ceph --cluster ceph --name client.bootstrap-mgr --keyring /var/lib/ceph/bootstrap-mgr/ceph.keyring auth get-or-create mgr.node02 mon allow profile mgr osd allow * mds allow * -o /var/lib/ceph/mgr/ceph-node02/keyring
[node02][INFO ] Running command: sudo systemctl enable ceph-mgr@node02
[node02][WARNIN] Created symlink from /etc/systemd/system/ceph-mgr.target.wants/ceph-mgr@node02.service to /usr/lib/systemd/system/ceph-mgr@.service.
[node02][INFO ] Running command: sudo systemctl start ceph-mgr@node02
[node02][INFO ] Running command: sudo systemctl enable ceph.target
- 安装mgr(管理守护进程), 大于12.x版本需安装, 我们装的是最新版,需执行:
ceph-deploy mgr create node00 node01 node02
- 安装OSD(对象存储设备)并且完成挂载
fdisk -l
查看加挂磁盘
加挂节点:
ceph-deploy osd create --data /dev/sdb node00
ceph-deploy osd create --data /dev/sdb node01
ceph-deploy osd create --data /dev/sdb node02
- 测试安装情况:
ceph-s
ceph config set mgr mgr/dashboard/server_addr 192.168.247.146
ceph config set mgr mgr/dashboard/server_port 18843
ceph config set mgr mgr/dashboard/server_addr node01
安装管理后台
- 开启dashboard模块
ceph mgr module enable dashboard
- 生成签名
ceph dashboard create-self-signed-cert
- 创建目录
mkdir mgr-dashboard&&cd mgr-dashboard
[root@node00 mgr-dashboard]# pwd
/opt/ceph/ceph-cluster/mgr-dashboard
- 生成密钥对
cd /opt/ceph/ceph-cluster/mgr-dashboard
openssl req -new -nodes -x509 -subj "/O=IT/CN=ceph-mgr-dashboard" -days 3650 -keyout dashboard.key -out dashboard.crt -extensions v3_ca
[root@linux30 mgr-dashboard]# ll
total 8
-rw-rw-r-- 1 ceph_user ceph_user 1155 Jul 14 02:26 dashboard.crt
-rw-rw-r-- 1 ceph_user ceph_user 1704 Jul 14 02:26 dashboard.key
- 启动dashboard
ceph mgr module disable dashboard
ceph mgr module enable dashboard
- 设置IP与PORT
ceph config set mgr mgr/dashboard/server_addr 192.168.247.146
ceph config set mgr mgr/dashboard/server_port 18843
- 关闭HTTPS
ceph config set mgr mgr/dashboard/ssl false
- 查看服务信息
[root@node00 ceph-cluster]# ceph mgr services
{
"dashboard": "http://192.168.247.146:18843/"
}
ceph config set mgr mgr/dashboard/server_addr node00
- 设置管理用户与密码
ceph dashboard set-login-credentials admin admin
安装问题记录
ceph -s
出现问题:
可能是时间同步问题,
ystemctl start ntpd #新增的节点没有启动ntpd
systemctl restart ceph-mon.target
systemctl restart ceph-mon.target
ceph-deploy mon
相关问题汇总:
ceph-deploy mon
出现mon.node40 monitor is not yet in quorum, tries left: 5
错误:
[root@node40 ceph-cluster]# ceph-deploy --overwrite-conf mon create-initial
[ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf
[ceph_deploy.cli][INFO ] Invoked (2.0.1): /usr/bin/ceph-deploy --overwrite-conf 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 : True
[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 0x7fbd853c1f80>
[ceph_deploy.cli][INFO ] cluster : ceph
[ceph_deploy.cli][INFO ] func : <function mon at 0x7fbd8562c410>
[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 node40 node41 node42
[ceph_deploy.mon][DEBUG ] detecting platform for host node40 ...
[node40][DEBUG ] connection detected need for sudo
[node40][DEBUG ] connected to host: node40
[node40][DEBUG ] detect platform information from remote host
[node40][DEBUG ] detect machine type
[node40][DEBUG ] find the location of an executable
[ceph_deploy.mon][INFO ] distro info: CentOS Linux 7.9.2009 Core
[node40][DEBUG ] determining if provided host has same hostname in remote
[node40][DEBUG ] get remote short hostname
[node40][DEBUG ] deploying mon to node40
[node40][DEBUG ] get remote short hostname
[node40][DEBUG ] remote hostname: node40
[node40][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf
[node40][DEBUG ] create the mon path if it does not exist
[node40][DEBUG ] checking for done path: /var/lib/ceph/mon/ceph-node40/done
[node40][DEBUG ] create a done file to avoid re-doing the mon deployment
[node40][DEBUG ] create the init path if it does not exist
[node40][INFO ] Running command: sudo systemctl enable ceph.target
[node40][INFO ] Running command: sudo systemctl enable ceph-mon@node40
[node40][INFO ] Running command: sudo systemctl start ceph-mon@node40
[node40][INFO ] Running command: sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.node40.asok mon_status
[node40][DEBUG ] ********************************************************************************
[node40][DEBUG ] status for monitor: mon.node40
[node40][DEBUG ] {
[node40][DEBUG ] "election_epoch": 1,
[node40][DEBUG ] "extra_probe_peers": [
[node40][DEBUG ] {
[node40][DEBUG ] "addrvec": [
[node40][DEBUG ] {
[node40][DEBUG ] "addr": "192.168.247.142:6789",
[node40][DEBUG ] "nonce": 0,
[node40][DEBUG ] "type": "v1"
[node40][DEBUG ] }
[node40][DEBUG ] ]
[node40][DEBUG ] },
[node40][DEBUG ] {
[node40][DEBUG ] "addrvec": [
[node40][DEBUG ] {
[node40][DEBUG ] "addr": "192.168.247.141:3300",
[node40][DEBUG ] "nonce": 0,
[node40][DEBUG ] "type": "v2"
[node40][DEBUG ] },
[node40][DEBUG ] {
[node40][DEBUG ] "addr": "192.168.247.141:6789",
[node40][DEBUG ] "nonce": 0,
[node40][DEBUG ] "type": "v1"
[node40][DEBUG ] }
[node40][DEBUG ] ]
[node40][DEBUG ] },
[node40][DEBUG ] {
[node40][DEBUG ] "addrvec": [
[node40][DEBUG ] {
[node40][DEBUG ] "addr": "192.168.247.142:3300",
[node40][DEBUG ] "nonce": 0,
[node40][DEBUG ] "type": "v2"
[node40][DEBUG ] },
[node40][DEBUG ] {
[node40][DEBUG ] "addr": "192.168.247.142:6789",
[node40][DEBUG ] "nonce": 0,
[node40][DEBUG ] "type": "v1"
[node40][DEBUG ] }
[node40][DEBUG ] ]
[node40][DEBUG ] }
[node40][DEBUG ] ],
[node40][DEBUG ] "feature_map": {
[node40][DEBUG ] "mon": [
[node40][DEBUG ] {
[node40][DEBUG ] "features": "0x3ffddff8ffecffff",
[node40][DEBUG ] "num": 1,
[node40][DEBUG ] "release": "luminous"
[node40][DEBUG ] }
[node40][DEBUG ] ]
[node40][DEBUG ] },
[node40][DEBUG ] "features": {
[node40][DEBUG ] "quorum_con": "0",
[node40][DEBUG ] "quorum_mon": [],
[node40][DEBUG ] "required_con": "0",
[node40][DEBUG ] "required_mon": []
[node40][DEBUG ] },
[node40][DEBUG ] "monmap": {
[node40][DEBUG ] "created": "2022-04-08 14:14:20.855876",
[node40][DEBUG ] "epoch": 0,
[node40][DEBUG ] "features": {
[node40][DEBUG ] "optional": [],
[node40][DEBUG ] "persistent": []
[node40][DEBUG ] },
[node40][DEBUG ] "fsid": "b3299c95-745f-467f-91e4-a3e30c490483",
[node40][DEBUG ] "min_mon_release": 0,
[node40][DEBUG ] "min_mon_release_name": "unknown",
[node40][DEBUG ] "modified": "2022-04-08 14:14:20.855876",
[node40][DEBUG ] "mons": [
[node40][DEBUG ] {
[node40][DEBUG ] "addr": "192.168.247.140:6789/0",
[node40][DEBUG ] "name": "node40",
[node40][DEBUG ] "public_addr": "192.168.247.140:6789/0",
[node40][DEBUG ] "public_addrs": {
[node40][DEBUG ] "addrvec": [
[node40][DEBUG ] {
[node40][DEBUG ] "addr": "192.168.247.140:3300",
[node40][DEBUG ] "nonce": 0,
[node40][DEBUG ] "type": "v2"
[node40][DEBUG ] },
[node40][DEBUG ] {
[node40][DEBUG ] "addr": "192.168.247.140:6789",
[node40][DEBUG ] "nonce": 0,
[node40][DEBUG ] "type": "v1"
[node40][DEBUG ] }
[node40][DEBUG ] ]
[node40][DEBUG ] },
[node40][DEBUG ] "rank": 0
[node40][DEBUG ] },
[node40][DEBUG ] {
[node40][DEBUG ] "addr": "192.168.247.142:6789/0",
[node40][DEBUG ] "name": "node42",
[node40][DEBUG ] "public_addr": "192.168.247.142:6789/0",
[node40][DEBUG ] "public_addrs": {
[node40][DEBUG ] "addrvec": [
[node40][DEBUG ] {
[node40][DEBUG ] "addr": "192.168.247.142:6789",
[node40][DEBUG ] "nonce": 0,
[node40][DEBUG ] "type": "v1"
[node40][DEBUG ] }
[node40][DEBUG ] ]
[node40][DEBUG ] },
[node40][DEBUG ] "rank": 1
[node40][DEBUG ] },
[node40][DEBUG ] {
[node40][DEBUG ] "addr": "0.0.0.0:0/1",
[node40][DEBUG ] "name": "node41",
[node40][DEBUG ] "public_addr": "0.0.0.0:0/1",
[node40][DEBUG ] "public_addrs": {
[node40][DEBUG ] "addrvec": [
[node40][DEBUG ] {
[node40][DEBUG ] "addr": "0.0.0.0:0",
[node40][DEBUG ] "nonce": 1,
[node40][DEBUG ] "type": "v1"
[node40][DEBUG ] }
[node40][DEBUG ] ]
[node40][DEBUG ] },
[node40][DEBUG ] "rank": 2
[node40][DEBUG ] }
[node40][DEBUG ] ]
[node40][DEBUG ] },
[node40][DEBUG ] "name": "node40",
[node40][DEBUG ] "outside_quorum": [
[node40][DEBUG ] "node40"
[node40][DEBUG ] ],
[node40][DEBUG ] "quorum": [],
[node40][DEBUG ] "rank": 0,
[node40][DEBUG ] "state": "probing",
[node40][DEBUG ] "sync_provider": []
[node40][DEBUG ] }
[node40][DEBUG ] ********************************************************************************
[node40][INFO ] monitor: mon.node40 is running
[node40][INFO ] Running command: sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.node40.asok mon_status
[ceph_deploy.mon][DEBUG ] detecting platform for host node41 ...
[node41][DEBUG ] connection detected need for sudo
[node41][DEBUG ] connected to host: node41
[node41][DEBUG ] detect platform information from remote host
[node41][DEBUG ] detect machine type
[node41][DEBUG ] find the location of an executable
[ceph_deploy.mon][INFO ] distro info: CentOS Linux 7.9.2009 Core
[node41][DEBUG ] determining if provided host has same hostname in remote
[node41][DEBUG ] get remote short hostname
[node41][DEBUG ] deploying mon to node41
[node41][DEBUG ] get remote short hostname
[node41][DEBUG ] remote hostname: node41
[node41][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf
[node41][DEBUG ] create the mon path if it does not exist
[node41][DEBUG ] checking for done path: /var/lib/ceph/mon/ceph-node41/done
[node41][DEBUG ] create a done file to avoid re-doing the mon deployment
[node41][DEBUG ] create the init path if it does not exist
[node41][INFO ] Running command: sudo systemctl enable ceph.target
[node41][INFO ] Running command: sudo systemctl enable ceph-mon@node41
[node41][INFO ] Running command: sudo systemctl start ceph-mon@node41
[node41][INFO ] Running command: sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.node41.asok mon_status
[node41][DEBUG ] ********************************************************************************
[node41][DEBUG ] status for monitor: mon.node41
[node41][DEBUG ] {
[node41][DEBUG ] "election_epoch": 117,
[node41][DEBUG ] "extra_probe_peers": [],
[node41][DEBUG ] "feature_map": {
[node41][DEBUG ] "mon": [
[node41][DEBUG ] {
[node41][DEBUG ] "features": "0x3ffddff8ffecffff",
[node41][DEBUG ] "num": 1,
[node41][DEBUG ] "release": "luminous"
[node41][DEBUG ] }
[node41][DEBUG ] ]
[node41][DEBUG ] },
[node41][DEBUG ] "features": {
[node41][DEBUG ] "quorum_con": "0",
[node41][DEBUG ] "quorum_mon": [],
[node41][DEBUG ] "required_con": "2449958747315912708",
[node41][DEBUG ] "required_mon": [
[node41][DEBUG ] "kraken",
[node41][DEBUG ] "luminous",
[node41][DEBUG ] "mimic",
[node41][DEBUG ] "osdmap-prune",
[node41][DEBUG ] "nautilus"
[node41][DEBUG ] ]
[node41][DEBUG ] },
[node41][DEBUG ] "monmap": {
[node41][DEBUG ] "created": "2022-04-08 14:02:08.362899",
[node41][DEBUG ] "epoch": 1,
[node41][DEBUG ] "features": {
[node41][DEBUG ] "optional": [],
[node41][DEBUG ] "persistent": [
[node41][DEBUG ] "kraken",
[node41][DEBUG ] "luminous",
[node41][DEBUG ] "mimic",
[node41][DEBUG ] "osdmap-prune",
[node41][DEBUG ] "nautilus"
[node41][DEBUG ] ]
[node41][DEBUG ] },
[node41][DEBUG ] "fsid": "b3299c95-745f-467f-91e4-a3e30c490483",
[node41][DEBUG ] "min_mon_release": 14,
[node41][DEBUG ] "min_mon_release_name": "nautilus",
[node41][DEBUG ] "modified": "2022-04-08 14:02:08.362899",
[node41][DEBUG ] "mons": [
[node41][DEBUG ] {
[node41][DEBUG ] "addr": "192.168.247.141:6789/0",
[node41][DEBUG ] "name": "node41",
[node41][DEBUG ] "public_addr": "192.168.247.141:6789/0",
[node41][DEBUG ] "public_addrs": {
[node41][DEBUG ] "addrvec": [
[node41][DEBUG ] {
[node41][DEBUG ] "addr": "192.168.247.141:6789",
[node41][DEBUG ] "nonce": 0,
[node41][DEBUG ] "type": "v1"
[node41][DEBUG ] }
[node41][DEBUG ] ]
[node41][DEBUG ] },
[node41][DEBUG ] "rank": 0
[node41][DEBUG ] },
[node41][DEBUG ] {
[node41][DEBUG ] "addr": "192.168.247.142:6789/0",
[node41][DEBUG ] "name": "node42",
[node41][DEBUG ] "public_addr": "192.168.247.142:6789/0",
[node41][DEBUG ] "public_addrs": {
[node41][DEBUG ] "addrvec": [
[node41][DEBUG ] {
[node41][DEBUG ] "addr": "192.168.247.142:6789",
[node41][DEBUG ] "nonce": 0,
[node41][DEBUG ] "type": "v1"
[node41][DEBUG ] }
[node41][DEBUG ] ]
[node41][DEBUG ] },
[node41][DEBUG ] "rank": 1
[node41][DEBUG ] },
[node41][DEBUG ] {
[node41][DEBUG ] "addr": "0.0.0.0:0/1",
[node41][DEBUG ] "name": "node40",
[node41][DEBUG ] "public_addr": "0.0.0.0:0/1",
[node41][DEBUG ] "public_addrs": {
[node41][DEBUG ] "addrvec": [
[node41][DEBUG ] {
[node41][DEBUG ] "addr": "0.0.0.0:0",
[node41][DEBUG ] "nonce": 1,
[node41][DEBUG ] "type": "v1"
[node41][DEBUG ] }
[node41][DEBUG ] ]
[node41][DEBUG ] },
[node41][DEBUG ] "rank": 2
[node41][DEBUG ] }
[node41][DEBUG ] ]
[node41][DEBUG ] },
[node41][DEBUG ] "name": "node41",
[node41][DEBUG ] "outside_quorum": [
[node41][DEBUG ] "node41"
[node41][DEBUG ] ],
[node41][DEBUG ] "quorum": [],
[node41][DEBUG ] "rank": 0,
[node41][DEBUG ] "state": "probing",
[node41][DEBUG ] "sync_provider": []
[node41][DEBUG ] }
[node41][DEBUG ] ********************************************************************************
[node41][INFO ] monitor: mon.node41 is running
[node41][INFO ] Running command: sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.node41.asok mon_status
[ceph_deploy.mon][DEBUG ] detecting platform for host node42 ...
[node42][DEBUG ] connection detected need for sudo
[node42][DEBUG ] connected to host: node42
[node42][DEBUG ] detect platform information from remote host
[node42][DEBUG ] detect machine type
[node42][DEBUG ] find the location of an executable
[ceph_deploy.mon][INFO ] distro info: CentOS Linux 7.9.2009 Core
[node42][DEBUG ] determining if provided host has same hostname in remote
[node42][DEBUG ] get remote short hostname
[node42][DEBUG ] deploying mon to node42
[node42][DEBUG ] get remote short hostname
[node42][DEBUG ] remote hostname: node42
[node42][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf
[node42][DEBUG ] create the mon path if it does not exist
[node42][DEBUG ] checking for done path: /var/lib/ceph/mon/ceph-node42/done
[node42][DEBUG ] create a done file to avoid re-doing the mon deployment
[node42][DEBUG ] create the init path if it does not exist
[node42][INFO ] Running command: sudo systemctl enable ceph.target
[node42][INFO ] Running command: sudo systemctl enable ceph-mon@node42
[node42][INFO ] Running command: sudo systemctl start ceph-mon@node42
[node42][INFO ] Running command: sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.node42.asok mon_status
[node42][ERROR ] admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
[node42][WARNIN] monitor: mon.node42, might not be running yet
[node42][INFO ] Running command: sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.node42.asok mon_status
[node42][ERROR ] admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
[node42][WARNIN] monitor node42 does not exist in monmap
[ceph_deploy.mon][INFO ] processing monitor mon.node40
[node40][DEBUG ] connection detected need for sudo
[node40][DEBUG ] connected to host: node40
[node40][DEBUG ] detect platform information from remote host
[node40][DEBUG ] detect machine type
[node40][DEBUG ] find the location of an executable
[node40][INFO ] Running command: sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.node40.asok mon_status
[ceph_deploy.mon][WARNIN] mon.node40 monitor is not yet in quorum, tries left: 5
[ceph_deploy.mon][WARNIN] waiting 5 seconds before retrying
[node40][INFO ] Running command: sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.node40.asok mon_status
[ceph_deploy.mon][WARNIN] mon.node40 monitor is not yet in quorum, tries left: 4
[ceph_deploy.mon][WARNIN] waiting 10 seconds before retrying
[node40][INFO ] Running command: sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.node40.asok mon_status
[ceph_deploy.mon][WARNIN] mon.node40 monitor is not yet in quorum, tries left: 3
[ceph_deploy.mon][WARNIN] waiting 10 seconds before retrying
[node40][INFO ] Running command: sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.node40.asok mon_status
[ceph_deploy.mon][WARNIN] mon.node40 monitor is not yet in quorum, tries left: 2
[ceph_deploy.mon][WARNIN] waiting 15 seconds before retrying
[node40][INFO ] Running command: sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.node40.asok mon_status
[ceph_deploy.mon][WARNIN] mon.node40 monitor is not yet in quorum, tries left: 1
[ceph_deploy.mon][WARNIN] waiting 20 seconds before retrying
[ceph_deploy.mon][INFO ] processing monitor mon.node41
[node41][DEBUG ] connection detected need for sudo
[node41][DEBUG ] connected to host: node41
[node41][DEBUG ] detect platform information from remote host
[node41][DEBUG ] detect machine type
[node41][DEBUG ] find the location of an executable
[node41][INFO ] Running command: sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.node41.asok mon_status
[ceph_deploy.mon][WARNIN] mon.node41 monitor is not yet in quorum, tries left: 5
[ceph_deploy.mon][WARNIN] waiting 5 seconds before retrying
[node41][INFO ] Running command: sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.node41.asok mon_status
[ceph_deploy.mon][WARNIN] mon.node41 monitor is not yet in quorum, tries left: 4
[ceph_deploy.mon][WARNIN] waiting 10 seconds before retrying
错误的含义是:mon.node40 监视器尚未达到仲裁状态,经过多轮尝试后失败。
网络参考可能原因:
防火墙:
hosts配置和hostname 不一致
public_network
配置问题
一些其他的文档说明是地址是public_network
如下图:
[分布式存储]Ceph环境部署失败问题总结
Ceph集群搭建记录的更多相关文章
- kafka集群搭建记录
本文记录搭建kafka搭建过程. 一.硬件机器介绍 192.168.183.195 master-node 192.168.183.194 data-node1 192.168.183.196 dat ...
- zookeeper集群搭建记录
本文仅记录zookeeper集群搭建的过程,留待日后查看.使用. 一.硬件机器: 192.168.183.195 master-node 192.168.183.194 data-node1 192. ...
- ceph集群搭建
CEPH 1.组成部分 1.1 monitor admin节点安装ceph-deploy工具 admin节点安装ceph-deploy 添加源信息 rm -f /etc/yum.repos.d/* w ...
- Ceph集群搭建及Kubernetes上实现动态存储(StorageClass)
集群准备 ceph集群配置说明 节点名称 IP地址 配置 作用 ceph-moni-0 10.10.3.150 centos7.5 4C,16G,200Disk 管理节点,监视器 monitor ...
- Centos下Apache+Tomcat集群--搭建记录
一.目的 利用apache的mod_jk模块,实现tomcat集群服务器的负载均衡以及会话复制,这里用到了<Cluster>. 二.环境 1.基础:3台主机,系统Centos6.5,4G内 ...
- Ceph 集群搭建
1.Ceph部署 1.1 Ceph 安装前准备,环境与拓扑图如下: 主机名 外网IP 内网IP 安装组件 磁盘块 c720181 172.22.69.84 192.168.20.181 ceph-de ...
- CEPH集群搭建(CentOS 7)
以包含四个节点的集群为例,其中包括一个 ceph-deploy 管理节点和一个三节点的Ceph存储集群. 下图中每个节点代表一台机器. 创建一个 Ceph 存储集群,它有一个 Monitor 和两个 ...
- ceph-deploy离线部署ceph集群及报错解决FAQ
ceph-deploy部署ceph集群 环境介绍 主机名 ip地址 操作系统 角色 备注 ceph-node1 10.153.204.13 Centos7.6 mon.osd.mds.mgr.rgw. ...
- docker创建ceph集群
背景 Ceph官方现在提供两类镜像来创建集群,一种是常规的,每一种Ceph组件是单独的一个镜像,如ceph/daemon.ceph/radosgw.ceph/mon.ceph/osd等:另外一种是最新 ...
随机推荐
- zookeeper操作节点代码
package cn.hbaf.zookeeper_api; import org.apache.curator.RetryPolicy; import org.apache.curator.fram ...
- java集合(arraylist详解)
一.ArrayList概述 ArrayList是实现List接口的动态数组,所谓动态就是它的大小是可变的.实现了所有可选列表操作,并允许包括 null 在内的所有元素.除了实现 List 接口外,此类 ...
- 开源.net core 验证码 - LazyCaptcha
LazyCaptcha 介绍 LazyCaptcha是仿EasyCaptcha和SimpleCaptcha,基于.Net Standard 2.1的图形验证码模块. 项目地址 效果展示 Captcha ...
- tracert命令简述
1. 路由跟踪在线Tracert工具说明 Tracert(跟踪路由)是路由跟踪实用程序,用于确定 IP 数据报访问目标所采取的路径.Tracert 命令用 IP 生存时间 (TTL) 字段和 ICMP ...
- LC-35
题目地址:https://leetcode-cn.com/problems/search-insert-position/ 一样的二分条件,多一个限制插入. 所以思考插入什么位置? 在 [left, ...
- String类为什么被设计成不可变类
1.享元模式: 1.共享元素模式,也就是说:一个系统中如果有多处用到了相同的一个元素,那么我们应该只存储一份此元素,而让所有地方都引用这一个元素. 2.Java中String就是根据享元模式设计的,而 ...
- @RequestBody和@RequestParam注解以及返回值,ajax相关知识点
关于前后端传递json数据这块查了好多资料,好多地方还是不清楚,先记录一下清楚的地方. 如果我们前端使用ajax发json数据,一般都加上contentType:'application/json;c ...
- Java语言学习day31--8月06日
今日内容介绍1.正则表达式的定义及使用2.Date类的用法3.Calendar类的用法 ###01正则表达式的概念和作用 * A: 正则表达式的概念和作用 * a: 正则表达式的概述 * 正则表达式也 ...
- 有意思的CVE-2022-0337复现
前言 前两天在刷tw,看到了个比较有意思的一个CVE漏洞,价值奖励是10000美刀,比较好奇的是价值10000美刀的漏洞是什么样子的,漏洞利用就是需要在浏览器中进行用户交互才能触发该漏洞,但由于 Wi ...
- Linux根目录下各文件目录的作用
bin 用户二进制可执行文件 boot 系统启动引导文件 dev[device] 系统中使用的外部设备,但不是放的外部设备的驱动.一个访问这些外部 ...