大网数据广告活动
服务器运维问答

libvirt: difference in exposing LVM logical volumes VS libvirt storage pools

· 52CE 我爱测

I started learning how to create a good virtualization stack with libvirt. I have created a LVM Volume Group that exposes a device block made of a Linux RAID. My idea is to give a Logical Volume to each virtual machine, but a per…

问题原文

原帖链接 · Germano Massullo · CC BY-SA 3.0

I started learning how to create a good virtualization stack with libvirt. I have created a LVM Volume Group that exposes a device block made of a Linux RAID. My idea is to give a Logical Volume to each virtual machine, but a person suggested me to use storage pools instead, like

<pool type='logical'>
  <name>VG_foo</name>
  <uuid>foo</uuid>
  <capacity unit='bytes'>0</capacity>
  <allocation unit='bytes'>0</allocation>
  <available unit='bytes'>0</available>
  <source>
    <device path='/dev/md2'/>
    <name>vg_foo</name>
    <format type='lvm2'/>
  </source>
  <target>
    <path>/dev/vg_foo</path>
    <permissions>
      <mode>0755</mode>
      <owner>-1</owner>
      <group>-1</group>
    </permissions>
  </target>
</pool>

I have read libvirt storage documentation but I did not understand the difference

已采纳解答

原帖链接 · Michael Hampton · CC BY-SA 3.0

The effect of both of these is the same, but in one case you are doing everything manually, and in the other case, libvirt is able to do everything for you.

With the storage pool defined, libvirt is able to create and manage volumes in that pool. Without the storage pool defined, you must manually create and manage the volumes outside of libvirt.

Note that a block device does not have to be part of a storage pool in order for a virtual machine managed by libvirt to use it. But if it is not, then you must manage it yourself.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-12-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。