Ceph-10.2.10安装配置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ceph-10.2.10安装配置相关的知识,希望对你有一定的参考价值。

Ceph-10.2.10安装配置

操作系统

CentOS 7.2.1511

主机规划

192.168.0.106 ceph-node1 #ceph-deploy
192.168.0.107 ceph-node2
192.168.0.108 ceph-node3

磁盘规划

/dev/sda system
/dev/sdb osd
/dev/sdc osd

关闭防火墙

# setenforce 0
# sed -i s‘/SELINUX=enforcing/SELINUX=disabled‘/g /etc/selinux/config
# yum -y install epel-release

ssh免密登录
ceph-node1

# ssh-keygen -t rsa
# ssh-copy-id ceph-node1
# ssh-copy-id ceph-node2
# ssh-copy-id ceph-node3

时间同步

# yum -y install ntp ntpdate
# ntpdate cn.pool.ntp.org

使用国内源

# export CEPH_DEPLOY_REPO_URL=http://mirrors.163.com/ceph/rpm-jewel/el7
# export CEPH_DEPLOY_GPG_URL=http://mirrors.163.com/ceph/keys/release.asc

安装ceph-deploy

# yum -y ceph-deploy

快速部署

# mkdir my-cluster
# cd my-cluster

# ceph-deploy new ceph-node1

# yum -y update ceph-deploy

# ceph-deploy install ceph-node1 ceph-node2 ceph-node3

# ceph-deploy mon create-initial

# ceph-deploy admin ceph-node1 ceph-node2 ceph-node3

查看磁盘
# ceph-deploy disk list ceph-node1

# ceph-deploy osd create ceph-node1:/dev/sdb ceph-node1:/dev/sdc

# ceph-deploy osd create ceph-node2:/dev/sdb ceph-node2:/dev/sdc

# ceph-deploy osd create ceph-node3:/dev/sdb ceph-node3:/dev/sdc

# ceph osd tree
[[email protected] ~]# ceph osd tree
ID WEIGHT  TYPE NAME           UP/DOWN REWEIGHT PRIMARY-AFFINITY 
-1 0.08752 root default                                          
-2 0.02917     host ceph-node1                                   
 0 0.01459         osd.0            up  1.00000          1.00000 
 1 0.01459         osd.1            up  1.00000          1.00000 
-3 0.02917     host ceph-node2                                   
 2 0.01459         osd.2            up  1.00000          1.00000 
 3 0.01459         osd.3            up  1.00000          1.00000 
-4 0.02917     host ceph-node3                                   
 4 0.01459         osd.4            up  1.00000          1.00000 
 5 0.01459         osd.5            up  1.00000          1.00000 

# chmod +r /etc/ceph/ceph.client.admin.keyring

检查健康状况
# ceph health
[[email protected] ~]# ceph health
HEALTH_OK

创建块设备
# rbd create rbd1 --size 10240 

查看创建的rbd
#rbd list
[[email protected] ~]# rbd list
rbd1

查看rbd细节
# rbd --image rbd1 info
[[email protected] ~]# rbd --image rbd1 info
rbd image ‘rbd1‘:
    size 10240 MB in 2560 objects
    order 22 (4096 kB objects)
    block_name_prefix: rbd_data.10372ae8944a
    format: 2
    features: layering, exclusive-lock, object-map, fast-diff, deep-flatten
    flags: 

以上是关于Ceph-10.2.10安装配置的主要内容,如果未能解决你的问题,请参考以下文章

vim代码片段插件ultisnips的使用

VSCode自定义代码片段11——vue路由的配置

VSCode自定义代码片段11——vue路由的配置

VSCode自定义代码片段11——vue路由的配置

VS Code配置markdown代码片段

VS Code配置markdown代码片段