hl10502的博客

ceph-deploy激活OSD出错 experimental feature 'bluestore' is not enabled

使用 ceph-deploy --overwrite-conf osd prepare --bluestore 的OSD,在激活OSD时出错 experimental feature ‘bluestore’ is not enabled

环境

  • CentOS Linux release 7.2.1511 (Core)
  • Jewel版ceph-10.2.7
  • ceph-deploy-1.5.37

创建OSD成功

1
[root@node201 ceph-cluster]# ceph-deploy --overwrite-conf osd prepare --bluestore node201:/dev/sdb

激活OSD出错

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
[root@node201 ceph-cluster]# ceph-deploy --overwrite-conf osd activate node201:/dev/sdb1
...
...
[node201][WARNIN] command: Running command: /usr/bin/timeout 300 ceph-osd --cluster ceph --mkfs --mkkey -i 0 --monmap /var/lib/ceph/tmp/mnt.RwxMi7/activate.monmap --osd-data /var/lib/ceph/tmp/mnt.RwxMi7 --osd-uuid 74872e01-68c2-4050-b8b5-7f20a3d0a88a --keyring /var/lib/ceph/tmp/mnt.RwxMi7/keyring --setuser ceph --setgroup ceph
[node201][WARNIN] mount_activate: Failed to activate
[node201][WARNIN] unmount: Unmounting /var/lib/ceph/tmp/mnt.RwxMi7
[node201][WARNIN] command_check_call: Running command: /bin/umount -- /var/lib/ceph/tmp/mnt.RwxMi7
[node201][WARNIN] Traceback (most recent call last):
[node201][WARNIN] File "/usr/sbin/ceph-disk", line 9, in <module>
[node201][WARNIN] load_entry_point('ceph-disk==1.0.0', 'console_scripts', 'ceph-disk')()
[node201][WARNIN] File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 5047, in run
[node201][WARNIN] main(sys.argv[1:])
[node201][WARNIN] File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 4998, in main
[node201][WARNIN] args.func(args)
[node201][WARNIN] File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 3357, in main_activate
[node201][WARNIN] reactivate=args.reactivate,
[node201][WARNIN] File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 3114, in mount_activate
[node201][WARNIN] (osd_id, cluster) = activate(path, activate_key_template, init)
[node201][WARNIN] File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 3290, in activate
[node201][WARNIN] keyring=keyring,
[node201][WARNIN] File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 2756, in mkfs
[node201][WARNIN] '--setgroup', get_ceph_user(),
[node201][WARNIN] File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 2720, in ceph_osd_mkfs
[node201][WARNIN] raise Error('%s failed : %s' % (str(arguments), error))
[node201][WARNIN] ceph_disk.main.Error: Error: ['ceph-osd', '--cluster', 'ceph', '--mkfs', '--mkkey', '-i', u'0', '--monmap', '/var/lib/ceph/tmp/mnt.RwxMi7/activate.monmap', '--osd-data', '/var/lib/ceph/tmp/mnt.RwxMi7', '--osd-uuid', u'74872e01-68c2-4050-b8b5-7f20a3d0a88a', '--keyring', '/var/lib/ceph/tmp/mnt.RwxMi7/keyring', '--setuser', 'ceph', '--setgroup', 'ceph'] failed : 2017-07-20 17:01:21.852764 7fa0be2b7800 -1 *** experimental feature 'bluestore' is not enabled ***
[node201][WARNIN] This feature is marked as experimental, which means it
[node201][WARNIN] - is untested
[node201][WARNIN] - is unsupported
[node201][WARNIN] - may corrupt your data
[node201][WARNIN] - may break your cluster is an unrecoverable fashion
[node201][WARNIN] To enable this feature, add this to your ceph.conf:
[node201][WARNIN] enable experimental unrecoverable data corrupting features = bluestore
[node201][WARNIN]
[node201][WARNIN] 2017-07-20 17:01:21.852769 7fa0be2b7800 -1 unable to create object store
[node201][WARNIN]
[node201][ERROR ] RuntimeError: command returned non-zero exit status: 1
[ceph_deploy][ERROR ] RuntimeError: Failed to execute command: /usr/sbin/ceph-disk -v activate --mark-init systemd --mount /dev/sdb1

解决

分析错误提示需要在ceph.conf文件中配置bluestore

enable_experimental_unrecoverable_data_corrupting_features = bluestore

修改ceph.conf之后,重启ceph,再重新激活

1
[root@node201 ceph-cluster]# systemctl restart ceph.target