ceph在激活OSD的时候提示没有权限是怎么回事?

发布于 2021-12-01 08:24:36 字数 3705 浏览 935 评论 0

我是用KVM虚拟机,系统是:

Description:    Ubuntu 16.04.2 LTS
Release:    16.04
Codename:    xenial

我是按着官方文档一步一步部署的:http://docs.ceph.com/docs/master/start/quick-ceph-deploy/

之前都没提示错误,直到最后激活OSD的时候提示没有权限。

ceph-deploy osd activate os0:/var/local/osd0 osd1:/var/local/osd1

部分日志如下:

[2017-06-03 11:07:16,805][osd0][WARNING] Traceback (most recent call last):
[2017-06-03 11:07:16,806][osd0][WARNING]   File "/usr/sbin/ceph-disk", line 9, in <module>
[2017-06-03 11:07:16,807][osd0][WARNING]     load_entry_point('ceph-disk==1.0.0', 'console_scripts', 'ceph-disk')()
[2017-06-03 11:07:16,808][osd0][WARNING]   File "/usr/lib/python2.7/dist-packages/ceph_disk/main.py", line 5047, in run
[2017-06-03 11:07:16,809][osd0][WARNING]     main(sys.argv[1:])
[2017-06-03 11:07:16,811][osd0][WARNING]   File "/usr/lib/python2.7/dist-packages/ceph_disk/main.py", line 4998, in main
[2017-06-03 11:07:16,812][osd0][WARNING]     args.func(args)
[2017-06-03 11:07:16,813][osd0][WARNING]   File "/usr/lib/python2.7/dist-packages/ceph_disk/main.py", line 3365, in main_activate
[2017-06-03 11:07:16,814][osd0][WARNING]     init=args.mark_init,
[2017-06-03 11:07:16,815][osd0][WARNING]   File "/usr/lib/python2.7/dist-packages/ceph_disk/main.py", line 3185, in activate_dir
[2017-06-03 11:07:16,817][osd0][WARNING]     (osd_id, cluster) = activate(path, activate_key_template, init)
[2017-06-03 11:07:16,818][osd0][WARNING]   File "/usr/lib/python2.7/dist-packages/ceph_disk/main.py", line 3290, in activate
[2017-06-03 11:07:16,819][osd0][WARNING]     keyring=keyring,
[2017-06-03 11:07:16,820][osd0][WARNING]   File "/usr/lib/python2.7/dist-packages/ceph_disk/main.py", line 2773, in mkfs
[2017-06-03 11:07:16,821][osd0][WARNING]     '--setgroup', get_ceph_group(),
[2017-06-03 11:07:16,822][osd0][WARNING]   File "/usr/lib/python2.7/dist-packages/ceph_disk/main.py", line 2720, in ceph_osd_mkfs
[2017-06-03 11:07:16,824][osd0][WARNING]     raise Error('%s failed : %s' % (str(arguments), error))
[2017-06-03 11:07:16,825][osd0][WARNING] ceph_disk.main.Error: Error: ['ceph-osd', '--cluster', 'ceph', '--mkfs', '--mkkey', '-i', u'0', '--monmap', '/var/local/osd0/activate.monmap', '--osd-data', '/var/local/osd0', '--osd-journal', '/var/local/osd0/journal', '--osd-uuid', u'd78c0b25-4972-4b3c-8aa7-5dc19b004f9d', '--keyring', '/var/local/osd0/keyring', '--setuser', 'ceph', '--setgroup', 'ceph'] failed : 2017-06-03 11:07:16.796543 7f037b2a38c0 -1 filestore(/var/local/osd0) mkfs: write_version_stamp() failed: (13) Permission denied
[2017-06-03 11:07:16,829][osd0][WARNING] 2017-06-03 11:07:16.796549 7f037b2a38c0 -1 OSD::mkfs: ObjectStore::mkfs failed with error -13
[2017-06-03 11:07:16,831][osd0][WARNING] 2017-06-03 11:07:16.796565 7f037b2a38c0 -1 ESC[0;31m ** ERROR: error creating empty object store in /var/local/osd0: (13) Permission deniedESC[0m
[2017-06-03 11:07:16,833][osd0][WARNING]
[2017-06-03 11:07:16,846][osd0][ERROR ] RuntimeError: command returned non-zero exit status: 1
[2017-06-03 11:07:16,847][ceph_deploy][ERROR ] RuntimeError: Failed to execute command: /usr/sbin/ceph-disk -v activate --mark-init systemd --mount /var/local/osd0

我是完全按着手册部署的,而且前面没有提示错误,我到OSD0,OSD1两台机器的/var/local/osd0和/var/local/osd1目录下看了一下,已经有文件存在了。不知道是哪的权限出了问题!还是python2.7的问题?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文