[libvirt] [PATCH] Drop virStorageBackendLogicalMatchPoolSource

Ján Tomko jtomko at redhat.com
Fri Jun 24 16:09:01 UTC 2016


On Wed, Jun 22, 2016 at 07:03:46AM -0400, John Ferlan wrote:
>
>
>On 06/17/2016 11:16 AM, Ján Tomko wrote:
>> On Thu, Jun 16, 2016 at 07:44:05AM -0400, John Ferlan wrote:
>>>
>>>
>>> On 06/16/2016 06:03 AM, Ján Tomko wrote:
>>>> On Wed, Jun 15, 2016 at 06:45:59PM -0400, John Ferlan wrote:
>>>>>
>>>>>
>>>>> On 06/15/2016 01:19 PM, Ján Tomko wrote:
>>>>>> Regression introduced by commit 71b803a for [1] that prevents
>>>>>> starting up
>>>>>> a logical pool created with <source><device path=''></source>
>>>>>> after it has been moved to a different physical volume.
>>>>>
>>>>> Is there a bug for this?  XML examples?
>>>>>
>>>>> Is an empty source device path string a valid value?  Reading
>>>>> http://libvirt.org/formatstorage.html doesn't give me that impression.
>>>>
>>>> I meant any pool with a <device> specified, not an empty path.
>>>
>>> But the patch is specifically targeted at removing the _logical pool
>>> check.  So the question is, is it "legal" for a logical pool to "start"
>>> with an empty string as a source device path? Secondarily I'm curious
>>> what's the use case of that?
>>
>> I do not know what happens with an empty string.
>> <source><device path=''></source> was not an exact snippet,
>> just a hint that there is a device path specified.
>>
>> If you create a pool like this:
>>
>> <pool type='logical'>
>>  <name>vgname</name>
>>  <source>
>>    <device path='/dev/sda4'/>
>>    <name>vgname</name>
>
>As I see things, this more or less lets libvirt "know" that "/dev/sda4"
>and "vgname" are associated.
>
>>   </source>
>>   <target>
>>      <path>/dev/vgname</path>
>>   </target>
>> </pool>
>>
>> Then pvmove /dev/sda4 to /dev/sda5, libvirt will refuse that pool
>> even though <name>vgname</name> is enough to uniquely identify a storage
>> pool.
>>
>
>As an admin you take this step to pvmove your data from /dev/sda4 to
>/dev/sda5.
>
>But then you expect libvirt to know that? Do you expect libvirt to
>automagically update the XML to /dev/sda5 during 'build' or 'start'?
>
>>>
>>>>
>>>> The whole point of LVM is abstraction from the lower layers so we
>>>> shouldn't ever be checking this.
>>>>
>>>
>>> So it's OK to activate/start a pool where the source device path is
>>> incorrect?
>>
>> For LVM, the important path is in <source><name>.
>>
>
>But isn't there a 1-to-1 relationship between the VG and the PV?  A PV
>cannot be in more than one VG, so if you move your PV, then you have to
>update your XML to let libvirt know.
>

Why would it need to know? Apart from pool building, libvirt does not
need the value for anything.

Jan

>
>John




More information about the libvir-list mailing list