On Wed, Dec 16, 2015 at 07:46:18AM -0500, John Ferlan wrote: > > > On 12/16/2015 07:02 AM, Ján Tomko wrote: > > On Mon, Dec 07, 2015 at 03:47:58PM -0500, John Ferlan wrote: > >> https://bugzilla.redhat.com/show_bug.cgi?id=1025230 > >> > >> Add a new helper virStorageBackendLogicalMatchPoolSource to compare the > >> pool's source name against the output from a 'pvs' command to list all > >> volume group physical volume data on the host. In addition, compare the > >> pool's source device list against the particular volume group's device > >> list to ensure the source device(s) listed for the pool match what the > >> was listed for the volume group. > >> > >> Then for pool startup or check API's we need to call this new API in > >> order to ensure that the pool we're about to start or declare active > >> during checkPool has a valid definition vs. the running host. > >> > > > > This patch breaks starting of logical pools with no source devices. > > > > Jan > > > > Not enough information for me to go on... Can you provide sample XML > that works prior to the change? From just your description I assume you > mean: > > <source> > <name>xxx</name> > <format type='lvm2'/> > </source> >
In my case it's:
<source>
<name>vg</name>
<format type='unknown'/>
</source>
<target>
<path>/dev/vg</path>
...
</target>
(Also, if the vg_name matches the pool name, the whole <source> element
can be omitted)
> instead of having a
>
> <device path='/dev/sde'/>
>
> As the source device
>
> Without a source device how would pool-build work (vgcreate)?
It would not, and pool-build is the only time when the list of physical
volumes is required.
Libvirt also uses the list for pool-delete, but this is IMO a bug,
considering that we do not keep this list up to date and it could end up
calling pvremove on PVs that are no longer a part of that VG.
Thinking about it some more, the point of LVM is to abstract from the
physical volumes, so I do not think we should burden the user with the
task of updating the pool's XML every time the underlying PVs change
(i.e. the USB hard drives were plugged in in a different order).
Instead of logging a warning / rejecting the pool, could we update the
source devices list on pool refresh?
Jan
signature.asc
Description: Digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
