• devstack环境中不能创建cinder volume


    刚安装好的devstack环境中无法成功创建cinder volume,创建的volume的status为error:
    在cinder scheduler中看到失败log:
    2015-10-15 14:12:22.057 ERROR cinder.scheduler.flows.create_volume [req-14f77cef-6ee9-463c-b9ce-2ffd40b4076b ba152f9f637c4bc2810f35cf3d3696dd 0d777ab85d9949c6ab961c6a883f3f40] Failed to run task cinder.scheduler.flows.create_volume.ScheduleCreateVolumeTask;volume:create: No valid host was found. No weighed hosts available

    为什么没有cinder host尼?
    在cinder volume服务中看到ERROR:
    2015-10-15 14:02:37.786 ERROR cinder.volume.manager [req-bccbf6c1-26c7-4503-88aa-090c1fc6501d None None] Failed to initialize driver.
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager Traceback (most recent call last):
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager   File "/opt/stack/cinder/cinder/volume/manager.py", line 322, in init_host
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager     self.driver.check_for_setup_error()
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager   File "/usr/local/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager     return f(*args, **kwargs)
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager   File "/opt/stack/cinder/cinder/volume/drivers/lvm.py", line 268, in check_for_setup_error
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager     lvm_conf=lvm_conf_file)
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager   File "/opt/stack/cinder/cinder/brick/local_dev/lvm.py", line 86, in __init__
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager     if self._vg_exists() is False:
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager   File "/opt/stack/cinder/cinder/brick/local_dev/lvm.py", line 123, in _vg_exists
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager     run_as_root=True)
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager   File "/opt/stack/cinder/cinder/utils.py", line 155, in execute
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager     return processutils.execute(*cmd, **kwargs)
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager   File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/processutils.py", line 275, in execute
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager     cmd=sanitized_cmd)
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager ProcessExecutionError: Unexpected error while running command.
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C vgs --noheadings -o name stack-volumes-lvmdriver-1
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager Exit code: 5
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager Stdout: u''
    2015-10-15 14:02:37.786 TRACE cinder.volume.manager Stderr: u'  Volume group "stack-volumes-lvmdriver-1" not found

    原来是VG在devstack安装中没有创建,接着手工创建vg:
    在devstack脚本中看到默认vg的创建过程
    lib/lvm
    function _create_lvm_volume_group

    $ truncate -s 15G vg_file
    $ sudo losetup -f --show vg_file
    /dev/loop0
    $ sudo vgcreate stack-volumes-lvmdriver-1 /dev/loop0
      No physical volume label read from /dev/loop0
      Physical volume "/dev/loop0" successfully created
      Volume group "stack-volumes-lvmdriver-1" successfully created


    重启cinder-volume就可以创建了。

  • 相关阅读:
    Remove Element
    wso2esb安装及helloworld
    动态布局中RadioGroup的RadioButton有时候不相互排斥的原因
    有关机房收费系统学生下机的思考
    ITOO之底层关系
    POJ 3252 Round Numbers(数位dp&记忆化搜索)
    怎样将「插件化」接入到项目之中?
    授人玫瑰 手留余香 --纪念python3.2.3官方文档翻译结束
    poj 2965 The Pilots Brothers' refrigerator
    怎样使用本文档
  • 原文地址:https://www.cnblogs.com/allcloud/p/4882308.html
Copyright © 2020-2023  润新知