libvirt支持的存储池类型

官网

 

1.directory pool

<pool type="dir">
  <name>virtimages</name>
  <target>
    <path>/var/lib/virt/images</path>
  </target>
</pool>

2.filesystem pool

<pool type="fs">
  <name>virtimages</name>
  <source>
    <device path="/dev/VolGroup00/VirtImages"/>
  </source>
  <target>
    <path>/var/lib/virt/images</path>
  </target>
</pool>

3.network filesystem pool

<pool type="netfs">
  <name>virtimages</name>
  <source>
    <host name="nfs.example.com"/>
    <dir path="/var/lib/virt/images"/>
    <format type='nfs'/>
  </source>
  <target>
    <path>/var/lib/virt/images</path>
  </target>
</pool>

4.logical volume pool

<pool type="logical">
  <name>HostVG</name>
  <source>
    <device path="/dev/sda1"/>
    <device path="/dev/sdb1"/>
    <device path="/dev/sdc1"/>
  </source>
  <target>
    <path>/dev/HostVG</path>
  </target>
</pool>

5.disk pool

<pool type="disk">
  <name>sda</name>
  <source>
    <device path='/dev/sda'/>
  </source>
  <target>
    <path>/dev</path>
  </target>
</pool>

6.iSCSI pool

<pool type="iscsi">
  <name>virtimages</name>
  <source>
    <host name="iscsi.example.com"/>
    <device path="iqn.2013-06.com.example:iscsi-pool"/>
  </source>
  <target>
    <path>/dev/disk/by-path</path>
  </target>
</pool>

7.iSCSI direct pool

<pool type="iscsi-direct">
  <name>virtimages</name>
  <source>
    <host name="iscsi.example.com"/>
    <device path="iqn.2013-06.com.example:iscsi-pool"/>
    <initiator>
      <iqn name="iqn.2013-06.com.example:iscsi-initiator"/>
    </initiator>
  </source>
</pool>

8.SCSI pool

<pool type="scsi">
  <name>virtimages</name>
  <source>
    <adapter name="host0"/>
  </source>
  <target>
    <path>/dev/disk/by-path</path>
  </target>
</pool>

9.multipath pool

<pool type="mpath">
  <name>virtimages</name>
  <target>
    <path>/dev/mapper</path>
  </target>
</pool>

10.rbd pool

<pool type="rbd">
  <name>myrbdpool</name>
  <source>
    <name>rbdpool</name>
    <host name='1.2.3.4'/>
    <host name='my.ceph.monitor'/>
    <host name='third.ceph.monitor' port='6789'/>
    <auth username='admin' type='ceph'>
      <secret uuid='2ec115d7-3a88-3ceb-bc12-0ac909a6fd87'/>
    </auth>
  </source>
</pool>


<volume>
  <name>myvol</name>
  <key>rbd/myvol</key>
  <source>
  </source>
  <capacity unit='bytes'>53687091200</capacity>
  <allocation unit='bytes'>53687091200</allocation>
  <target>
    <path>rbd:rbd/myvol</path>
    <format type='unknown'/>
    <permissions>
      <mode>00</mode>
      <owner>0</owner>
      <group>0</group>
    </permissions>
  </target>
</volume>

11.sheepdog pool

<pool type="sheepdog">
  <name>mysheeppool</name>
  <source>
    <name>mysheeppool</name>
    <host name='localhost' port='7000'/>
  </source>
</pool>

<volume>
  <name>myvol</name>
  <key>sheep/myvol</key>
  <source>
  </source>
  <capacity unit='bytes'>53687091200</capacity>
  <allocation unit='bytes'>53687091200</allocation>
  <target>
    <path>sheepdog:myvol</path>
    <format type='unknown'/>
    <permissions>
      <mode>00</mode>
      <owner>0</owner>
      <group>0</group>
    </permissions>
  </target>
</volume>



12.gluster pool

<pool type="gluster">
  <name>myglusterpool</name>
  <source>
    <name>volname</name>
    <host name='localhost'/>
    <dir path='/'/>
  </source>
</pool>

<volume>
  <name>myfile</name>
  <key>gluster://localhost/volname/myfile</key>
  <source>
  </source>
  <capacity unit='bytes'>53687091200</capacity>
  <allocation unit='bytes'>53687091200</allocation>
</volume>

13.zfs pool

<pool type="zfs">
  <name>myzfspool</name>
  <source>
    <name>zpoolname</name>
    <device path="/dev/ada1"/>
    <device path="/dev/ada2"/>
  </source>
</pool>


14.vstorage pool

<pool type="vstorage">
  <name>myvstoragepool</name>
  <source>
    <name>clustername</name>
  </source>
  <target>
    <path>/mnt/clustername</path>
  </target>
</pool>

  

 

posted @ 2019-07-03 15:30  larlly  阅读(660)  评论(0)    收藏  举报