[libvirt] [PATCH] storage: Fix problem of creating a volume in LVM pool

Osier Yang jyang at redhat.com
Thu Jun 30 13:46:20 UTC 2011


于 2011年06月30日 18:22, Daniel P. Berrange 写道:
> On Thu, Jun 30, 2011 at 06:40:20PM +0800, Osier Yang wrote:
>> LVM allows one specify the VG with VG path like "/dev/lv_pool", and
>> it gets the correct VG name internally by skipping "/dev".
>>
>> <snip>
>>      vg_name = skip_dev_dir(cmd, argv[0], NULL);
>>
>>      if (strrchr(vg_name, '/')) {
>>          log_error("Volume group name expected "
>>                    "(no slash)");
>>          return 0;
>>      }
>> </snip>
>>
>> However, if the path is like "/dev/t/lv_pool", the VG name will be
>> "/t/lv_pool" then, definitely it's not a valid VG name, and LVM will
>> complain and fail.
>
> Isn't that just a user error for specifying an invalid<path>  for the
> target in the XML then ?
>
> Daniel

If I'm correct, it can be a path of a nest VG.

Regards
Osier




More information about the libvir-list mailing list