ceph安装过程
创建群集
[2019-03-20 18:35:04,232][ceph_deploy.conf][DEBUG ] found configuration file at: /home/sceph/.cephdeploy.conf
[2019-03-20 18:35:04,233][ceph_deploy.cli][INFO ] Invoked (2.0.1): /usr/bin/ceph-deploy new ceph1
sudo /usr/sbin/ip link show
sudo /usr/sbin/ip addr show
========================================
安装ceph文件
[2019-03-21 10:36:07,664][ceph_deploy.conf][DEBUG ] found configuration file at: /home/sceph/.cephdeploy.conf
[2019-03-21 10:36:07,666][ceph_deploy.cli][INFO ] Invoked (2.0.1): /usr/bin/ceph-deploy install ceph1 ceph2 ceph3
sudo yum clean all
sudo yum -y install epel-release
sudo yum -y install yum-plugin-priorities
sudo rpm --import https://download.ceph.com/keys/release.asc
sudo yum remove -y ceph-release
sudo yum install -y https://download.ceph.com/rpm-mimic/el7/noarch/ceph-release-1-0.el7.noarch.rpm
ensuring that /etc/yum.repos.d/ceph.repo contains a high priority
sudo yum -y install ceph ceph-radosgw
[2019-03-21 11:15:01,990][ceph1][INFO ] Running command: sudo ceph --version
[2019-03-21 11:15:02,126][ceph1][DEBUG ] ceph version 13.2.5 (cbff874f9007f1869bfd3821b7e33b2a6ffd4988) mimic (stable)
====================================
创建mon
[2019-03-21 15:29:30,161][ceph_deploy.conf][DEBUG ] found configuration file at: /home/sceph/.cephdeploy.conf
[2019-03-21 15:29:30,161][ceph_deploy.cli][INFO ] Invoked (2.0.1): /usr/bin/ceph-deploy mon create-initial
sudo ceph-mon --cluster ceph --mkfs -i ceph1 --keyring /var/lib/ceph/tmp/ceph-ceph1.mon.keyring --setuser 167 --setgroup 167
sudo systemctl enable ceph.target
sudo systemctl enable ceph-mon@ceph1
sudo systemctl start ceph-mon@ceph1
sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.ceph1.asok mon_status
sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.ceph1.asok mon_status
sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.ceph1.asok mon_status
sudo /usr/bin/ceph --connect-timeout=25 --cluster=ceph --admin-daemon=/var/run/ceph/ceph-mon.ceph1.asok mon_status
sudo /usr/bin/ceph --connect-timeout=25 --cluster=ceph --name mon. --keyring=/var/lib/ceph/mon/ceph-ceph1/keyring auth get client.admin
sudo /usr/bin/ceph --connect-timeout=25 --cluster=ceph --name mon. --keyring=/var/lib/ceph/mon/ceph-ceph1/keyring auth get client.bootstrap-mds
sudo /usr/bin/ceph --connect-timeout=25 --cluster=ceph --name mon. --keyring=/var/lib/ceph/mon/ceph-ceph1/keyring auth get client.bootstrap-mgr
sudo /usr/bin/ceph --connect-timeout=25 --cluster=ceph --name mon. --keyring=/var/lib/ceph/mon/ceph-ceph1/keyring auth get client.bootstrap-osd
sudo /usr/bin/ceph --connect-timeout=25 --cluster=ceph --name mon. --keyring=/var/lib/ceph/mon/ceph-ceph1/keyring auth get client.bootstrap-rgw
================================
推送配置
[2019-03-21 17:22:03,950][ceph_deploy.conf][DEBUG ] found configuration file at: /home/sceph/.cephdeploy.conf
[2019-03-21 17:22:03,950][ceph_deploy.cli][INFO ] Invoked (2.0.1): /usr/bin/ceph-deploy admin ceph1 ceph2 ceph3
Pushing admin keys and conf to ceph3
================================
创建mgr
[2019-03-21 17:26:53,722][ceph_deploy.conf][DEBUG ] found configuration file at: /home/sceph/.cephdeploy.conf
[2019-03-21 17:26:53,723][ceph_deploy.cli][INFO ] Invoked (2.0.1): /usr/bin/ceph-deploy mgr create ceph2
Deploying mgr, cluster ceph hosts ceph2:ceph2
sudo ceph --cluster ceph --name client.bootstrap-mgr --keyring /var/lib/ceph/bootstrap-mgr/ceph.keyring auth get-or-create mgr.ceph2 mon allow profile mgr osd allow * mds allow * -o /var/lib/ceph/mgr/ceph-ceph2/keyring
sudo systemctl enable ceph-mgr@ceph2
================================
创建三个osd,在admin node上
ceph-deploy osd create --data /dev/vdb ceph1
ceph-deploy osd create --data /dev/vdb ceph2
ceph-deploy osd create --data /dev/vdb ceph3
====================================
到此完毕,检查状态是否正常
sudo ceph health
sudo ceph -s
ceph quorum_status --format json-pretty
====================================
实践,创建pool,并存储一个对象
echo "11111" > my.txt
ceph osd pool create mypool 8
rados put m1 my.txt --pool=mypool
rados -p mypool ls
rados df
检查到底存了没有
[root@ceph1 ~]# rados -p mypool ls
m1
[root@ceph1 ~]# rados df
POOL_NAME USED OBJECTS CLONES COPIES MISSING_ON_PRIMARY UNFOUND DEGRADED RD_OPS RD WR_OPS WR
mypool 12 B 1 0 3 0 0 0 0 0 B 1 1 KiB
total_objects 1
total_used 3.0 GiB
total_avail 177 GiB
total_space 180 GiB
[root@ceph1 ~]# cat my.txt
11111111111
标识对象位置
[root@ceph1 ~]# ceph osd map mypool m1
osdmap e16 pool 'mypool' (1) object 'm1' -> pg 1.c3958388 (1.0) -> up ([1,2,0], p1) acting ([1,2,0], p1)
[root@ceph1 ~]#
删除对象
[root@ceph1 ~]# rados rm m1 --pool=mypool
删除pool
[root@ceph1 ~]# ceph osd pool rm mypool
Error EPERM: WARNING: this will *PERMANENTLY DESTROY* all data stored in pool mypool. If you are *ABSOLUTELY CERTAIN* that is what you want, pass the pool name *twice*, followed by --yes-i-really-really-mean-it.
[root@ceph1 ~]# ceph osd pool rm mypool mypool --yes-i-really-really-mean-it
Error EPERM: pool deletion is disabled; you must first set the mon_allow_pool_delete config option to true before you can destroy a pool
==================================
ceph mgr module enable dashboard
ceph dashboard create-self-signed-cert
禁用ssl
ceph config set mgr mgr/dashboard/ssl false
[root@ceph2 yum.repos.d]# ceph mgr services
{
"dashboard": "https://192.168.7.152:9800/"
}
===================================
[sceph@ceph1 ~]$ ceph-deploy mds create ceph2
=====================================
[sceph@ceph1 ~]$ ceph-deploy --overwrite-conf rgw create ceph1
radosgw-admin user create --uid=786 --display-name=fff --system
radosgw-admin user info --uid=786
ceph dashboard set-rgw-api-access-key Y2CAASJE4Z0HFAD26R1R
ceph dashboard set-rgw-api-secret-key dJzSwCHeMkqhbksV0zcDnalPzBPjHz3wRG3aRlSN
然后在dashboard上就可看到object gateway了
[root@ceph1 ceph]# systemctl status ceph-radosgw@ceph1
=====================================
vi /etc/ceph/ceph.conf
[client.rgw.ceph1]
rgw_frontends = civetweb port=9080
systemctl restart ceph-radosgw.target
systemctl -a
#ceph-deploy --overwrite-conf config push ceph1
=======================================
mon的数据库是rocksdb
https://github.com/facebook/rocksdb/wiki/Administration-and-Data-Access-Tool
在/var/lib/ceph/mon/ceph-ceph1/store.db
59 unzip rocksdb-master.zip
61 cd rocksdb-master
65 yum install gcc gcc-c++ perl
70 yum install perl
72 make
73 make install
83 scp -r 192.168.7.151:/var/lib/ceph/mon/ceph-ceph1/store.db ~/
87 cd ~/store.db/
90 ~/rocksdb/rocksdb-master/ldb --db=007031.sst scan
91 ~/rocksdb/rocksdb-master/sst_dump -h
92 ~/rocksdb/rocksdb-master/sst_dump --file=007031.sst --command=scan
93 ~/rocksdb/rocksdb-master/sst_dump --file=007031.sst --command=scan --read_num=5
97 ~/rocksdb/rocksdb-master/sst_dump --file=007031.sst --command=raw
99 less 007031_dump.txt
=======================================
[root@ceph1 rbdpool]# ceph pg map 8.13
osdmap e55 pg 8.13 (8.13) -> up [0,2,1] acting [0,2,1]
ceph安装过程的更多相关文章
- ceph 安装过程
安装依赖: yum install -y yum-utils && yum-config-manager --add-repo https://dl.fedoraproject.org ...
- ceph安装
使用ceph-deploy部署部署版本ceph-luminous 一,下载安装包,制作yum源,yum将挂载到192.168.100.100 (1)下载安装包 mkdir ceph-luminou ...
- webstorm下载&&安装过程&&打开项目
一.webstorm下载 WebStorm 是jetbrains公司旗下一款JavaScript 开发工具.被广大中国JS开发者誉为"Web前端开发神器"."最强大的HT ...
- vagrant 1.8.6 安装过程及总结遇到的坑
下面先总结遇到的问题,这些问题如果你也遇到,可能需要搜索很多次才能找到原因. 如果想看安装过程,可以先直接跳到后面第二部分部分. 1 问题汇总: 1.1 vagrant版本过高问题. vagrant ...
- 安装过程错误[INS-30131]
问题:Oracle Database 安装过程错误[INS-30131] 原因:安装用户没有对临时文件夹的读写权限 解决方案: 1.以管理员身份运行cmd.exe 2.输入命令(需启动Se ...
- TortoiseGIT的安装过程详解
TortoiseGIT简介 TortoiseGIT 是Git版本控制系统的一个免费开源客户端,它是git版本控制的 Windows 扩展.可以使你避免使用枯燥而且不方便的命令行.它完全嵌入 Windo ...
- RabbitMQ 集群安装过程详解
一.安装Erlang 1.rabbitMQ是基于erlang的,所以首先必须配置erlang环境. 从erlang官网下载 otp 18.3.下载链接:http://erlang.org/downlo ...
- JAVA安装过程中出现的“javac不是内部或外部指令”的解决方法
近来重新安装了JAVA,安装过程中出现问题,网上找到解决办法,汇总发布. 解决流程: 1.确定自己的环境变量设置没问题,没有出现遗漏 : . 等情况 (具体环境变量设置百度) 2.环境变量设置后 ,d ...
- LNMP安装过程
LNMP一键安装包是什么? LNMP一键安装包是一个用Linux Shell编写的可以为CentOS/RadHat/Fedora.Debian/Ubuntu/Raspbian/Deepin VPS或独 ...
随机推荐
- 微信小程序列表时间戳转换
第一步先写js 随便命名为times.js function toDate(number){ var n=number * 1000; var date = new Date(n) ...
- LinkedHashSet -有序,不重合集合,但仍不可索引,结合for循环取元素,数据多可能效率低
package cn.learn.collection.Set; import java.util.HashSet; import java.util.Iterator; import java.ut ...
- js 函数 写法
// function ckeckName(){}; // function checkUser(){}; // function checkPassWorld(){}; // var checkNa ...
- 自定义Aspect风格的AOP框架
本篇博客参考<架构探险--从零开始写java web框架>4.3章节 1代理接口: package smart.myaop.framework; public interface Prox ...
- python常用模块---collections、time、random、os、sys、序列号模块
collections模块 在内置数据类型(dict.list.set.tuple)的基础上,collections模块还提供了几个额外的数据类型:Counter.deque.defaultdict. ...
- go 上下文context
go控制并发有两种经典的方式,一种是WaitGroup,另外一种就是Context WaitGroup这种方式是控制多个goroutine同时完成 func main() { var wg sync. ...
- go 文件读写
go 文件读写有很多方式 ioutil读文件 package main import ( "io/ioutil" "fmt" ) func main() { d ...
- redis 不可重入分布式锁(setNx()和getset()方法实现)
通常如果在单机环境,使用synchronized或juc ReentrantLock 实现锁机制,但如果是分布式系统,则需要借助第三方工具实现,比如redis.zookeeper等.redis为单进程 ...
- P4542 [ZJOI2011]营救皮卡丘(Floyd+网络流)
P4542 [ZJOI2011]营救皮卡丘 乍一看似乎没啥题相似的 仔细一看,$N<=150$ 边又是双向边,似乎可以用Floyd搞 先跑一遍Floyd处理出$dis[i][j]$ 注意到走 ...
- Android APP 登陆模块
首先我想强调一点.这个登陆的模块最好是放在另外一个线程里面来实现.否则有可能会爆出一系列的问题, 然后再与主UI 交互.这样就不会爆ANR异常 1.对于登陆模块的.首先大体的逻辑肯定是要清晰的. ...