您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
本篇文章为大家展示了ubuntu中怎么部署ceph集群,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。
# wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add - # echo deb https://download.ceph.com/debian-jewel/ $(lsb_release -sc) main | sudo tee /etc/apt/sources.list.d/ceph.list
# apt-get install ceph-deploy
# apt-get install ceph
# mkdir /opt/ceph # cd /opt/ceph # ceph-deploy new k8s1 k8s2 k8s3 # echo mon_pg_warn_max_per_osd = 1000 >> ceph.conf # echo cluster_network=172.16.13.0/24 >> ceph.conf # echo max open files = 131072 >> ceph.conf # echo osd_scrub_begin_hour=1 >> ceph.conf # echo osd_scrub_end_hour=7 >> ceph.conf # echo "osd max object name len = 256" >> ceph.conf # echo "osd max object namespace len = 64" >> ceph.conf
# ceph-deploy mon create-initial
# cp ceph.client.admin.keyring /etc/ceph/
由于没有裸盘,所以直接指定目录作为osd,尝试了下新版luminous,ceph-deploy里似乎不支持指定目录作为osd
# mkdir -p /data/ceph/data # chown ceph:ceph /data/ceph/data/ # ceph-deploy osd prepare k8s2:/data/ceph/data # ceph-deploy osd activate k8s2:/data/ceph/data
三个节点每个节点一个osd
# ceph -s cluster 6d8963e9-9585-4679-8dac-17b60f2d0c30 health HEALTH_OK monmap e1: 3 mons at {tj006=172.16.41.25:6789/0,tj007=172.16.41.26:6789/0,tj008=172.16.41.27:6789/0} election epoch 12, quorum 0,1,2 tj006,tj007,tj008 osdmap e14: 3 osds: 3 up, 3 in flags sortbitwise,require_jewel_osds pgmap v29: 64 pgs, 1 pools, 0 bytes data, 0 objects 7811 GB used, 39739 GB / 50064 GB avail 64 active+clean
# ceph-deploy mds create k8s1 # ceph osd pool create k8s_data 32 # ceph osd pool create k8s_metadata 32 # ceph fs new ceph_k8s k8s_metadata k8s_data # mkdir /data/ceph/cephfs # mount -t ceph 172.16.13.160:6789:/ /data/ceph/cephfs -o name=admin,secretfile=/etc/ceph/admin.secret
上述内容就是ubuntu中怎么部署ceph集群,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注亿速云行业资讯频道。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。