[libvirt] [PATCH]Fix minor issues in logical storage backend
Daniel Veillard
veillard at redhat.com
Thu Sep 4 13:13:45 UTC 2008
On Thu, Aug 28, 2008 at 06:15:27PM -0600, Jim Fehlig wrote:
> Hi All!
>
> I came across some problems trying to create a new LVM-based storage
> pool using this config
>
> <pool type="logical">
> <name>test_vg</name>
> <source>
> <device path="/dev/sdb1"/>
> </source>
> <target>
> <path>/dev/test_vg</path>
> </target>
> </pool>
>
> Volume group did not previously exist so I did
> virsh pool-define <above.xml>
> virsh pool-build test_vg
>
> pool-build failed since the backend logical storage driver does not have
> VIR_STORAGE_BACKEND_POOL_SOURCE_DEVICE set in flags. Without this flag
> set, the device element is never parsed in virStoragePoolDefParseDoc()
> (storage_conf.c), causing pvcreate to fail since no physical volume is
> specified.
Hum, looking at the current code now I see
.poolOptions = {
.flags = VIR_STORAGE_BACKEND_POOL_SOURCE_NAME,
.formatFromString = virStorageBackendLogicalPoolFormatFromString,
So there is an initialization of the field. It's unclear to me if
the two should be OR'ed, or should be kept as-is, if we have the pool
name do we need to provide the pool device then ? I get a bit confused
now.
> After this problem was memory corruption cause by miscalculating the
> size of vgcreate command line :-).
Whoops !! :-)
That one applied cleanly.
So at least I'm commiting this part.
thanks !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list