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
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.
As the above has said its very similar, a storage pool is basically a Volume group and libvirt manages the logical volumes created.
Whereas you would be manually creating a Volume group and manually creating the disks and then adding them to the VM.
Just add a storage pool and create the disk on VM creation.