Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deploy ceph storage cluster in Docker

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to deploy ceph storage clusters in Docker. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.

Docker pulls ceph/daemon version

Docker pull ceph/daemon

After download, check the images list, docker images, and see as shown in the figure:

Docker creates ceph private network ceph-net

Execute the command to create the network and view the ceph-net information

Docker network create ceph-netdocker inspect ceph-net

Create ceph monitor based on ceph network

Vi cre_mon.sh

Docker run-d-- net=ceph-net-v ${PWD} / etc:/etc/ceph-v ${PWD} / lib:/var/lib/ceph-e MON_IP=172.18.0.2-e CEPH_PUBLIC_NETWORK=172.18.0.0/16-- name=mon ceph/daemon mon

Execute sh cre_mon.sh to create the monitor container: created successfully as shown in the figure.

Create a mgr container

Docker run-d-- net=ceph-net-v ${PWD} / etc:/etc/ceph-v ${PWD} / lib:/var/lib/ceph-e MON_IP=172.18.0.2-e CEPH_PUBLIC_NETWORK=172.18.0.0/16-- name=mgr ceph/daemon mgr

Create osd

Vi cre_osd1.sh

Docker run-d-net=ceph-net

-- privileged=true

-v ${PWD} / etc:/etc/ceph

-v ${PWD} / lib:/var/lib/ceph

-v / dev/:/dev/

-e OSD_DEVICE=/dev/sdb

-e OSD_TYPE=disk

-e OSD_FORCE_ZAP=1

-- name=osd1

Ceph/daemon osd

After executing sh cre_osd1.sh, it is found that the container did not start successfully. Check the logs,docker logs osd1 and report an error.

2020-10-13 06:44:58 / opt/ceph-container/bin/entrypoint.sh: static: does not generate config 2020-10-13 06:44:58 / opt/ceph-container/bin/entrypoint.sh: ERROR- / var/lib/ceph/bootstrap-osd/ceph.keyring must exist. You can extract it from your current monitor by running 'ceph auth get client.bootstrap-osd-o / var/lib/ceph/bootstrap-osd/ceph.keyring'

Perform the generate keyring operation by logging in to mon

Docker exec-it mon bashceph auth get client.bootstrap-osd-o / var/lib/ceph/bootstrap-osd/ceph.keyring

After the build is complete, the docker start osd1 is re-executed and still fails to start. The principle ceph-disk has been deprecated. For does not generate config errors, because no key was generated, execute the command: docker exec-it mon ceph auth get client.bootstrap-osd-o / var/lib/ceph/bootstrap-osd/ceph.keyring

Use ceph-volume to create an osd

First execute the prepare script:

# Execute Scripts

Cat | docker run-rm-I-net=ceph-net-privileged=true-v ${PWD} / etc:/etc/ceph-v ${PWD} / lib:/var/lib/ceph-v / dev/:/dev/-- entrypoint=bash ceph/daemon

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report