[root@server01 ~]# mkdir -p /home/deploy
[root@server01 ~]# cd /home/deploy
ceph-deploy --overwrite-conf mon create-initial
ceph-deploy --overwrite-conf osd create ceph1429 --data /dev/vdb
[root@server01 deploy]# ceph-deploy admin ceph1429
[root@server01 deploy]# ceph-deploy mgr create ceph1429
[root@server01 ~]# ceph mgr module enable dashboard --force
[root@server01 ~]# ceph config set mgr mgr/dashboard/ssl false
[root@server01 ~]# ceph mgr module disable dashboard
[root@server01 ~]# ceph mgr module enable dashboard
ceph dashboard ac-user-create cmpadmin administrator -i password
ceph-deploy rgw create ceph1429
$ ceph osd pool delete cephrbd cephrbd --yes-i-really-really-mean-it
Error EPERM: pool deletion is disabled; you must first set the mon_allow_pool_delete config\n
option to true before you can destroy a pool
这是由于没有配置mon节点的 mon_allow_pool_delete 字段所致,解决办法就是到mon节点进行相应的设置
[root@server01 ~]# radosgw-admin user create --uid=admin --display-name=admin --system
执行 radosgw-admin user create --uid=admin --display-name=admin --system 卡住
[root@ceph1429 ~]# ceph osd pool ls detail
可知pg状态有问题,主要原因是存储池副本数为3,但我部署的是单节点环境,所以有问题。
[root@ceph1429 ~]# for i in `ceph osd pool ls`;do ceph osd pool set $i size 1 ;done
关闭该节点上所有的mgr,mon。然后重新启动mon,mgr问题解决。
版本:ceph version 14.2.9 (581f22da52345dba46ee232b73b990f06029a2a0) nautilus (stable)
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
baseurl=https://mirrors.aliyun.com/ceph/rpm-mimic/el7/noarch
gpgkey=https://mirrors.aliyun.com/ceph/keys/release.asc
[manager@deploy ~]$ mkdir my-cluster
[manager@deploy ~]$ cd my-cluster/
[manager@deploy my-cluster]$ ceph-deploy new terry-2 (...)
(2)安装ceph ceph-deploy install terry-2 (...)
原因:版本不兼容。通过yum -y remove ceph-release卸载后再执行安装。
原因:未知。索性删掉rm -rf /usr/local/bin/ceph,再执行,通过。但是还是有问题。。。未解决
(3)初始化mon [root@terry-2 deploy] ceph-deploy mon create-initial
原因:老报这个问题,可能是上步清ceph时候把/etc/ceph文件夹也删掉了。手动创建/etc/ceph文件夹。
原因没有public_network,这是由于没有在ceph.conf中配置,修改ceph.conf配置文件(此IP段根据个人情况设定),添加public_network = 192.168.1.0/24
(4)部署MGR [root@terry-2 deploy] ceph-deploy mgr create terry-2 (...)
(5)复制key [root@terry-2 deploy] ceph-deploy admin terry-2 (...)
(6)部署OSD [root@terry-2 deploy] ceph-deploy disk list terry-2 (...)
ceph-deploy osd create --data /dev/vdb terry-2
ceph-deploy osd create --data /dev/vdc terry-2
ceph-deploy osd create --data /dev/vdd terry-2
[root@terry-2 deploy] ceph mgr module enable dashboard
[root@terry-2 deploy] ceph dashboard create-self-signed-cert
[root@terry-2 deploy] ceph dashboard set-login-credentials cmpadmin comleader@123
[root@terry-2 deploy] ceph mgr services
(8)界面登录 https://192.168.227.184:8443/
参考文档:002.Ceph安装部署 - 云+社区 - 腾讯云
创建rgw网关:[root@terry-2 deploy] ceph-deploy rgw create terry-2
数据清除 ceph-deploy purgedata terry-2