[root@lab8106 ceph]# docker ps -l CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 86ed05173432 ceph/daemon "/entrypoint.sh mon" About a minute ago Up 59 seconds mon
可以看到退出了,我们来docker logs -f mon看下日志的输出
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
[root@lab8106 ceph]# docker logs -f mon /sbin/ip creating /etc/ceph/ceph.client.admin.keyring creating /etc/ceph/ceph.mon.keyring creating /var/lib/ceph/bootstrap-osd/ceph.keyring creating /var/lib/ceph/bootstrap-mds/ceph.keyring creating /var/lib/ceph/bootstrap-rgw/ceph.keyring monmaptool: monmap file /etc/ceph/monmap-ceph monmaptool: set fsid to cb5df106-25b3-4f93-9f54-baca2976a47b monmaptool: writing epoch 0 to /etc/ceph/monmap-ceph (1 monitors) creating /tmp/ceph.mon.keyring importing contents of /etc/ceph/ceph.client.admin.keyring into /tmp/ceph.mon.keyring importing contents of /var/lib/ceph/bootstrap-osd/ceph.keyring into /tmp/ceph.mon.keyring importing contents of /var/lib/ceph/bootstrap-mds/ceph.keyring into /tmp/ceph.mon.keyring importing contents of /var/lib/ceph/bootstrap-rgw/ceph.keyring into /tmp/ceph.mon.keyring importing contents of /etc/ceph/ceph.mon.keyring into /tmp/ceph.mon.keyring ceph-mon: set fsid to cb5df106-25b3-4f93-9f54-baca2976a47b ceph-mon: created monfs at /var/lib/ceph/mon/ceph-lab8106 for mon.lab81
提示成功了
我们看下生成的文件
1 2 3 4 5 6
[root@lab8106 ceph]# ll /etc/ceph total 16 -rw------- 1 root root 137 Mar 14 17:53 ceph.client.admin.keyring -rw-r--r-- 1 root root 285 Mar 14 17:53 ceph.conf -rw------- 1 64045 64045 77 Mar 14 17:53 ceph.mon.keyring -rw-r--r-- 1 64045 64045 187 Mar 14 17:53 monmap-ceph
[root@lab8106 ceph]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 874d78ccae55 ceph/daemon "/entrypoint.sh osd_c" 14 hours ago Up 14 hours myosd1 86ed05173432 ceph/daemon "/entrypoint.sh mon" 15 hours ago Up 15 hours mon
[root@lab8106 ceph]# docker ps -l CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9b269bf751f9 ceph/daemon "/bin/bash" 2 minutes ago Exited (0) 15 seconds ago angry_hawking