提交 ca4515d2 编写于 作者: J John Ferlan

storage: Better describe logical pool creation/definition parameters

https://bugzilla.redhat.com/show_bug.cgi?id=1398087

Clean up the virsh man page description for --pool-create-as in order
to better describe how the various arguments are used when creating
(or defining) a logical pool.

Also modify the storage pool XML parsing algorithm to check for the
mismatched "name" and "source-name".
上级 5d5380cf
......@@ -760,6 +760,14 @@ virStoragePoolDefParseXML(xmlXPathContextPtr ctxt)
if (VIR_STRDUP(ret->source.name, ret->name) < 0)
goto error;
}
if (ret->type == VIR_STORAGE_POOL_LOGICAL &&
STRNEQ(ret->name, ret->source.name)) {
virReportError(VIR_ERR_XML_ERROR,
_("for a logical pool, the pool name='%s' "
"must match the pool source name='%s'"),
ret->name, ret->source.name);
goto error;
}
}
if ((options->flags & VIR_STORAGE_POOL_SOURCE_ADAPTER) &&
......
......@@ -3639,6 +3639,13 @@ follow-up command to build the pool. The I<--overwrite> and
I<--no-overwrite> flags follow the same rules as B<pool-build>. If
just I<--build> is provided, then B<pool-build> is called with no flags.
For a "logical" pool only [I<--name>] needs to be provided. The [I<--name>]
must match the Volume Group name for which the pool is being defined or
created. The [I<--source-name>] if provided must match the Volume Group
name. If not provided, one will be generated using the [I<--name>]. If
provided the [I<--target>] is ignored and a target source is generated
using the [I<--source-name>] (or as generated from the [I<--name>]).
=item B<pool-define> I<file>
Define an inactive persistent storage pool or modify an existing persistent one
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册