mirror of https://gitee.com/openkylin/libvirt.git
storage: create logical volume with --yes option
If lvcreate found an existing signature when trying to create a new logical volume (E.g. left after some deleted volume), the action failed due to inability to answer interactive question to wiping it (lvcreate assumed 'no' was the answer). With added option --yes to the command line, the answer to any interactive question is assumed to be yes. Therefore, lvcreate wipes the signature and the new volume is created successfully. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1940413 Signed-off-by: Kristina Hanicova <khanicov@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
7b8d4d99b5
commit
d91a3e96c0
|
@ -863,6 +863,8 @@ virStorageBackendLogicalLVCreate(virStorageVolDef *vol,
|
|||
else
|
||||
virCommandAddArg(cmd, def->source.name);
|
||||
|
||||
virCommandAddArg(cmd, "--yes");
|
||||
|
||||
return virCommandRun(cmd, NULL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue