环境

两台CentOS7.5,每台各两块硬盘部署OSD

public network = 10.0.0.0/24

cluster network = 172.16.0.0/24

导入ceph的rpm key

[root@]# rpm --import 'https://download.ceph.com/keys/release.asc'

配置rpm

/etc/yum.repos.d/ceph-luminous.repo

[ceph]
name=Ceph packages for $basearch
baseurl=https://download.ceph.com/rpm-luminous/el7/x86_64/ 
enabled=1
priority=2
gpgcheck=1
type=rpm-md
gpgkey=https://download.ceph.com/keys/release.asc [ceph-noarch]
name=Ceph noarch packages
baseurl=https://download.ceph.com/rpm-luminous/el7/noarch
enabled=1
priority=2
gpgcheck=1
type=rpm-md
gpgkey=https://download.ceph.com/keys/release.asc [ceph-source]
name=Ceph source packages
baseurl=https://download.ceph.com/rpm-luminous/el7/SRPMS/
enabled=0
priority=2
gpgcheck=1
type=rpm-md
gpgkey=https://download.ceph.com/keys/release.asc

安装依赖

[root@ ~]#  yum install snappy leveldb gdisk python-argparse gperftools-libs
[root@ ~]#  yum install -y yum-utils 
[root@ ~]#  yum-config-manager --add-repo https://dl.fedoraproject.org/pub/epel/7/x86_64/ 
[root@ ~]#  yum install --nogpgcheck -y epel-release 
[root@ ~]#  rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 
[root@ ~]#  rm -f /etc/yum.repos.d/dl.fedoraproject.org*

安装ceph

[root@ ~]# yum install ceph

配置ceph

/etc/ceph/ceph.conf

[global]
max open files = 131072
fsid = a7f64266-0894-4f1e-a635-d0aeaca0e993
auth cluster required = none
auth service required = none
auth client required = none
osd pool default size = 2
osd pool default min size = 1
osd pool default pg num = 1024
osd pool default pgp num = 1024
osd crush chooseleaf type = 1
mon osd full ratio = .95
mon osd nearfull ratio = .85
public network = 10.0.0.0/24
cluster network = 172.16.0.0/24 [mon]
mon initial members = a
mon data = /var/lib/ceph/mon/$cluster-$id
mon allow pool delete = true [mon.a]
host = ceph0
mon addr = 10.0.0.10:6789 [osd]
enable experimental unrecoverable data corrupting features = bluestore rocksdb
osd objectstore = bluestore
bluestore = true [osd.0]
host =  ceph0
devs = /dev/sdb1
bluestore block path = /dev/sdb2 [osd.1]
host =  ceph0
devs = /dev/sdc1
bluestore block path = /dev/sdc2 [osd.2]
host =  ceph1
devs = /dev/sdb1
bluestore block path = /dev/sdb2 [osd.3]
host =  ceph1
devs = /dev/sdc1
bluestore block path = /dev/sdc2

mon.a

[root@ ~]# ceph-authtool /etc/ceph/ceph.mon.keyring --create-keyring --gen-key -n mon.
[root@ ~]# ceph-mon -i a --mkfs --keyring /etc/ceph/ceph.mon.keyring
[root@ ~]# chown ceph:ceph -R  /var/lib/ceph/mon/ceph-a
[root@ ~]# systemctl start ceph-mon@a

mgr.a

[root@ ~]# sudo -u ceph mkdir -p /var/lib/ceph/mgr/ceph-a/
[root@ ~]# sudo -u ceph ceph auth get-or-create mgr.a  mon 'allow profile mgr' osd 'allow *' mds 'allow *' > /var/lib/ceph/mgr/ceph-a/keyring
[root@ ~]# ceph-mgr -i a

osd.0

[root@ ~]# mkfs.xfs /dev/sdb1  
[root@ ~]# mkdir /var/lib/ceph/osd/ceph-0
[root@ ~]# mount /dev/sdb1 /var/lib/ceph/osd/ceph-0/
[root@ ~]# ceph osd create 
[root@ ~]# ceph-osd -i 0 --mkfs --mkkey 
[root@ ~]# ceph auth add osd.0 osd 'allow *' mon 'allow rwx' -i /var/lib/ceph/osd/ceph-0/keyring 
[root@ ~]# ceph osd crush add osd.0 0.2 root=default host=ceph0
[root@ ~]# ceph-osd -i 0

其他osd同样的部署

CentOS7.5 部署Ceph luminous的更多相关文章

  1. CentOS7.6部署ceph环境

    CentOS7.6部署ceph环境 测试环境: 节点名称 节点IP 磁盘 节点功能 Node-1 10.10.1.10/24 /dev/sdb 监控节点 Node-2 10.10.1.20/24 /d ...

  2. centos7下搭建ceph luminous(12.2.1)--无网或网络较差

    本博客的主要内容是在centos7下搭建luminous,配置dashboard,搭建客户端使用rbd,源码安装ceph,最后给出一些较为常用的命令.本博客针对初次接触ceph的人群. 搭建环境: 主 ...

  3. Centos7下部署ceph 12.2.1 (luminous)集群及RBD使用

    前言 本文搭建了一个由三节点(master.slave1.slave2)构成的ceph分布式集群,并通过示例使用ceph块存储. 本文集群三个节点基于三台虚拟机进行搭建,节点安装的操作系统为Cento ...

  4. CentOS7.2 部署Ceph分布式存储

    1.1 环境准备 主机名 IP地址 ceph-admin 192.168.16.220 ceph-node1,ceph-mon 192.168.16.221 ceph-node2,ceph-mon 1 ...

  5. Centos7下设置ceph 12.2.1 (luminous)dashboard UI监控功能

    前言 本文所使用的集群是作者在博客 Centos7下部署ceph 12.2.1 (luminous)集群及RBD使用  中所搭建的集群 dashboard是为了完成对集群状态进行UI监控所开发的功能, ...

  6. Centos7下使用Ceph-deploy快速部署Ceph分布式存储-操作记录

    之前已详细介绍了Ceph分布式存储基础知识,下面简单记录下Centos7使用Ceph-deploy快速部署Ceph环境: 1)基本环境 192.168.10.220 ceph-admin(ceph-d ...

  7. Ceph学习之路(三)Ceph luminous版本部署

    1.配置ceph.repo并安装批量管理工具ceph-deploy [root@ceph-node1 ~]# vim /etc/yum.repos.d/ceph.repo [ceph] name=Ce ...

  8. Centos7下使用Ceph-deploy快速部署Ceph分布式存储-操作记录(转)

    之前已详细介绍了Ceph分布式存储基础知识,下面简单记录下Centos7使用Ceph-deploy快速部署Ceph环境:1)基本环境 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ...

  9. 使用虚拟机CentOS7部署CEPH集群

    第1章   CEPH部署 1.1  简单介绍 Ceph的部署模式下主要包含以下几个类型的节点 Ø CephOSDs: A Ceph OSD 进程主要用来存储数据,处理数据的replication,恢复 ...

随机推荐

  1. Linux配置crontab

    1. 添加任务(每分钟执行一次)crontab -e* * * * * /home/lings/logRotate.sh 2. 查看日志Jun 5 20:25:01 localhost CROND[8 ...

  2. mysql Last_SQL_Errno: 1197 Coordinator stopped because there were error(s) in the worker(s)问题处理

    Last_SQL_Errno: 1197 Coordinator stopped because there were error(s) in the worker(s). The most rece ...

  3. OpenShift环境中手工模式添加etcd server

    模拟备份和恢复,在现有的集群环境,单master(etcd), infra和node上面添加另外一台机器作为etcd Server. 基于OpenShift 3.11版本,详情可以参考 https:/ ...

  4. C#程序打包安装部署之添加注册表项(转)

    今天为大家整理了一些怎样去做程序安装包的具体文档,这些文档并不能确保每个人在做安装包的时候都能正确去生成和运行,但是这些文档的指导作用对于需要的朋友来说还是很有必要的,在实际产品的安装部署过程中可能有 ...

  5. 网页视频直播、微信视频直播技术解决方案:EasyNVR与EasyDSS流媒体服务器组合之区分不同场景下的直播接入需求

    背景分析 熟悉EasyNVR产品的朋友们都知道,EasyNVR不仅可以独成体系,而且还可以跟其他系列产品相配合,形成各种不同类型的解决方案,满足各种不同应用场景的实际需求.针对很多设备现场没有固定公网 ...

  6. LeetCode_415. Add Strings

    415. Add Strings Easy Given two non-negative integers num1 and num2 represented as string, return th ...

  7. 170道python面试题(转)

    作者:麋鹿链接:https://www.zhihu.com/question/54513391/answer/779646691来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明 ...

  8. [LeetCode] 128. Longest Consecutive Sequence 求最长连续序列

    Given an unsorted array of integers, find the length of the longest consecutive elements sequence. F ...

  9. [LeetCode] 323. Number of Connected Components in an Undirected Graph 无向图中的连通区域的个数

    Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), ...

  10. Spring boot使用Aspose.Slides操作ppt转PDF、转图片

    最近要将ppt转为PDF和图片,Apache poi ,jacob都试了下 Apache poi 转图片乱码,处理了,还会存在部分乱码 jacob对系统依赖比较大,必须是windows还得安装MS O ...