Libvirt 管理的“逻辑”存储池上卷的存储卷加密

Libvirt 管理的“逻辑”存储池上卷的存储卷加密

我不知道如何为位于“逻辑”池类型(即 LVM 上)的卷创建加密存储卷(由 libvirt 管理)。

# virsh vol-create ocz-5ef92v58m9be7jo9 /tmp/in
error: Failed to create vol from /tmp/in
error: unsupported configuration: storage pool does not support encrypted volumes

有什么例子吗?看http://libvirt.org/formatstorageencryption.html

我当前的(明文)卷和池。

[root@host2 ~]# virsh vol-dumpxml --pool ocz-5ef92v58m9be7jo9 win1                                                                                                                                                  
<volume type='block'>
  <name>win1</name>
  <key>c4f8Of-XYnj-YwA7-VUDe-y7BI-AEr1-S84NWT</key>
  <source>
    <device path='/dev/sda3'>
      <extent start='0' end='32212254720'/>
    </device>
  </source>
  <capacity unit='bytes'>32212254720</capacity>
  <allocation unit='bytes'>32212254720</allocation>
  <target>
    <path>/dev/ocz-5ef92v58m9be7jo9/win1</path>
    <permissions>
      <mode>0600</mode>
      <owner>0</owner>
      <group>6</group>
      <label>system_u:object_r:fixed_disk_device_t:s0</label>
    </permissions>
    <timestamps>
      <atime>1488029824.526381599</atime>
      <mtime>1488029824.526381599</mtime>
      <ctime>1488029824.526381599</ctime>
    </timestamps>
  </target>
</volume>

[root@host2 ~]# virsh pool-dumpxml ocz-5ef92v58m9be7jo9                                                                                                                                                             
<pool type='logical'>
  <name>ocz-5ef92v58m9be7jo9</name>
  <uuid>64607ea8-f2a2-4c9c-9d48-0d7f32486b2d</uuid>
  <capacity unit='bytes'>111388131328</capacity>
  <allocation unit='bytes'>32212254720</allocation>
  <available unit='bytes'>79175876608</available>
  <source>
    <device path='/dev/sda3'/>
    <name>ocz-5ef92v58m9be7jo9</name>
    <format type='lvm2'/>
  </source>
  <target>
    <path>/dev/ocz-5ef92v58m9be7jo9</path>
  </target>
</pool>

相关内容