To start the OSD docker:
~$ docker run -d --name=osd1 --restart unless-stopped --net=host --privileged=true \
-v /etc/ceph:/etc/ceph -v /var/lib/ceph/:/var/lib/ceph -v /dev/:/dev/ \
-e OSD_DEVICE=/dev/sdb ceph/daemon osd_ceph_disk
But the start fails:
~$ docker logs -f osd1
[...]
2018-11-21 10:49:50 /entrypoint.sh: static: does not generate config
HEALTH_WARN no active mgr
2018-11-21 10:49:50 /entrypoint.sh: INFO: It looks like /dev/sdb is an OSD
2018-11-21 10:49:50 /entrypoint.sh: You can use the zap_device scenario on the appropriate device to zap it
2018-11-21 10:49:50 /entrypoint.sh: Moving on, trying to activate the OSD now.
/usr/lib/python2.7/site-packages/ceph_disk/main.py:5689: UserWarning:
*******************************************************************************
This tool is now deprecated in favor of ceph-volume.
It is recommended to use ceph-volume for OSD deployments. For details see:
http://docs.ceph.com/docs/master/ceph-volume/#migrating
*******************************************************************************
warnings.warn(DEPRECATION_WARNING)
main_activate: path = /dev/sdb1
get_dm_uuid: get_dm_uuid /dev/sdb1 uuid path is /sys/dev/block/8:17/dm/uuid
command: Running command: /usr/sbin/blkid -o udev -p /dev/sdb1
command: Running command: /sbin/blkid -p -s TYPE -o value -- /dev/sdb1
command: Running command: /usr/bin/ceph-conf --cluster=ceph --name=osd. --lookup osd_mount_options_xfs
command: Running command: /usr/bin/ceph-conf --cluster=ceph --name=osd. --lookup osd_fs_mount_options_xfs
mount: Mounting /dev/sdb1 on /var/lib/ceph/tmp/mnt.wuQHuS with options noatime,inode64
command_check_call: Running command: /usr/bin/mount -t xfs -o noatime,inode64 -- /dev/sdb1 /var/lib/ceph/tmp/mnt.wuQHuS
command: Running command: /usr/sbin/restorecon /var/lib/ceph/tmp/mnt.wuQHuS
activate: Cluster uuid is f737d251-7efe-4437-bd16-d223a44d9a96
command: Running command: /usr/bin/ceph-osd --no-mon-config --cluster=ceph --show-config-value=fsid
activate: Cluster name is ceph
activate: OSD uuid is 5194cbfa-2f6b-4184-9127-1878f11f6efd
activate: OSD id is 0
activate: Initializing OSD...
command_check_call: Running command: /usr/bin/ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring mon getmap -o /var/lib/ceph/tmp/mnt.wuQHuS/activate.monmap
got monmap epoch 1
mount_activate: Failed to activate
unmount: Unmounting /var/lib/ceph/tmp/mnt.wuQHuS
command_check_call: Running command: /bin/umount -- /var/lib/ceph/tmp/mnt.wuQHuS
/usr/lib/python2.7/site-packages/ceph_disk/main.py:5713: UserWarning:
*******************************************************************************
This tool is now deprecated in favor of ceph-volume.
It is recommended to use ceph-volume for OSD deployments. For details see:
http://docs.ceph.com/docs/master/ceph-volume/#migrating
*******************************************************************************
warnings.warn(DEPRECATION_WARNING)
Traceback (most recent call last):
File "/usr/sbin/ceph-disk", line 9, in <module>
load_entry_point('ceph-disk==1.0.0', 'console_scripts', 'ceph-disk')()
File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 5772, in run
main(sys.argv[1:])
File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 5710, in main
args.func(args)
File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 3796, in main_activate
reactivate=args.reactivate,
File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 3559, in mount_activate
(osd_id, cluster) = activate(path, activate_key_template, init)
File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 3736, in activate
keyring=keyring,
File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 3207, in mkfs
raise Error('unrecognized objectstore type %s' % osd_type)
ceph_disk.main.Error: Error: unrecognized objectstore type None
toto