libvritd 配置 rbd存储池

栏目: 服务器 · 发布时间: 7年前

内容简介:搭建openstack时,配置好rbd后,我们并没有在virsh pool-list 时看到一个存储池,但是如果我们要配置一个存储池也是可以的:编写配置文件: rbd-volumes.xml其中rbd-volumes是我们给这个存储池起的一个名字,随便你;

搭建openstack时,配置好rbd后,我们并没有在virsh pool-list 时看到一个存储池,但是如果我们要配置一个存储池也是可以的:

编写配置文件: rbd-volumes.xml

<pool type='rbd'>
<name>rbd-volumes</name>
<source>
<host name='10.88.12.4' port='6789'/>
<name>volumes</name>
<auth username='cinder' type='ceph'>
<secret uuid='9dd5c6f0-ffc2-476b-b89c-071998ad8462'/>
</auth>
</source>
</pool>

其中rbd-volumes是我们给这个存储池起的一个名字,随便你;

10.88.12.4 是ceph monitor节点地址

volumes 是rbd所在的ceph中的pool

auth里面有用户名cinder和预先定义好的秘钥(秘钥通过secret-define来定义)

然后执行:

virsh pool-define rbd-volumes.xml

然后就会自动生成文件 /etc/libvirt/storage/rbd-volumes.xml:

<pool type='rbd'>
  <name>rbd-volumes</name>
  <uuid>09ec5b59-509d-40b9-9c8a-e03e8de60b1d</uuid>
  <capacity unit='bytes'>0</capacity>
  <allocation unit='bytes'>0</allocation>
  <available unit='bytes'>0</available>
  <source>
    <host name='10.88.12.4' port='6789'/>
    <name>volumes</name>
    <auth type='ceph' username='cinder'>
      <secret uuid='9dd5c6f0-ffc2-476b-b89c-071998ad8462'/>
    </auth>
  </source>
</pool>

然后通过virsh pool-list 可以查看到定义好的存储池:

virsh pool-list

然后启动池子:

virsh pool-start rbd-volumes

就可以列出来存储池中的rbd了;(我这里的volumes就是上面提到的rbd-volumes)

libvritd 配置 rbd存储池

然后就可以使用这里的rbd来启动虚拟机了呗?不过又遇到问题,通过virt-manage来使用这里的rbd创建机器时报错:

libvritd 配置 rbd存储池

话说这个和/root/volumes 有毛关系?

google 之,别人也有遇到: https://bugzilla.redhat.com/show_bug.cgi?id=1074169#c14

问题似乎出现在virt-manager 上,问题版本: 1.4.1 ; 换个新的试试:

https://github.com/virt-manager/virt-manager

更新到 1.5.0 依然存在这个问题,稍后再研究; 最新的版本构建起来麻烦一些,依赖 python 3的东西,我的安装源中有些找不到

相关fix: https://github.com/tonich-sh/virt-manager/commit/ce939a04099431ea273fa53850ab8a6db363a112


以上所述就是小编给大家介绍的《libvritd 配置 rbd存储池》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Refactoring

Refactoring

Martin Fowler、Kent Beck、John Brant、William Opdyke、Don Roberts / Addison-Wesley Professional / 1999-7-8 / USD 64.99

Refactoring is about improving the design of existing code. It is the process of changing a software system in such a way that it does not alter the external behavior of the code, yet improves its int......一起来看看 《Refactoring》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换