Skip to content

Instantly share code, notes, and snippets.

@mpwsh
Last active November 29, 2018 08:01
Show Gist options
  • Save mpwsh/58ca3f8a6b14123831b517ccd08c8b34 to your computer and use it in GitHub Desktop.
Save mpwsh/58ca3f8a6b14123831b517ccd08c8b34 to your computer and use it in GitHub Desktop.
ceph workarounds

ceph-mon (all nodes, change PUBLIC_NETWORK according to each node)

docker run -d --net=host \
--restart always \
-v /etc/ceph:/etc/ceph \
-v /var/lib/ceph/:/var/lib/ceph/ \
-e MON_IP=192.168.10.153 \
-e CEPH_PUBLIC_NETWORK=192.168.10.0/24 \
--name="ceph-mon" \
ceph/daemon:tag-build-master-luminous-centos-7 mon

ceph-mgr (all nodes)

docker run -d --net=host \
--privileged=true \
--pid=host \
-v /etc/ceph:/etc/ceph \
-v /var/lib/ceph/:/var/lib/ceph/ \
--name="ceph-mgr" \
--restart=always \
ceph/daemon mgr

(all nodes)

ceph auth get client.bootstrap-osd -o \
/var/lib/ceph/bootstrap-osd/ceph.keyring

if error " protocol feature mismatch", exec bash in docker container 'ceph mon' in ds1 and run this command

ceph osd crush tunables hammer

to execute commands inside container run:

docker exec -it ceph-mon /bin/bash -c "export TERM=xterm; exec bash"

ceph-osd (all nodes)

docker run -d --net=host \
--hostname ceph-osd01 \
--pid=host \
--name="ceph-osd" \
-v /etc/ceph:/etc/ceph \
-v /var/lib/ceph:/var/lib/ceph \
-v /dev/:/dev/ \
--name="ceph-osd" \
--restart=always \
ceph/daemon osd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment