Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dirkmueller:acdc:as_python3_module
lvm2
bug-1193181_vgimportclone_on_hardware_snapshot_...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bug-1193181_vgimportclone_on_hardware_snapshot_does_not_work.patch of Package lvm2
From: Heming Zhao <heming.zhao@suse.com> Date: Sun, 12 Dec 2021 16:10:36 +0800 Subject: SUSE special patch for vgimportclone When a cloned VG PVs and an original VG PVs co-exist on a machine, while original VG name had been changed after cloned, vgimportclone will failed for reporting like: ``` 15sp2:~ # vgimportclone --basevgname vg_vdc /dev/vdc WARNING: scan found duplicate PVID Ohhd1S3GWesmks1HQjrZUs2j1wOBOhyd on /dev/vdc WARNING: Not using device /dev/vdc for PV Ohhd1S-3GWe-smks-1HQj-rZUs-2j1w-OBOhyd. WARNING: PV Ohhd1S-3GWe-smks-1HQj-rZUs-2j1w-OBOhyd prefers device /dev/vdb because device is used by LV. Volume group "vg_vdb" not found Cannot process volume group vg_vdb ``` This patch is a SUSE special patch for bsc#1193181. upstream code later than commit 83fe6e720f42711ff183a66909b690b726702f58 doesn't suffer this bug. Commit 83fe6e720f42 is not specific for fixing vgimportclone issue, and it is very hard to use the code of commit 83fe6e720f4. At last, this patch was created. When lvm2 source code newer than commit 83fe6e720f42, developer should remove this patch. Signed-off-by: Heming Zhao <heming.zhao@suse.com> --- diff -Nupr a/tools/toollib.c b/tools/toollib.c --- a/tools/toollib.c 2021-12-12 16:18:18.070655516 +0800 +++ b/tools/toollib.c 2021-12-12 16:19:12.190347509 +0800 @@ -2172,6 +2172,22 @@ static void _choose_vgs_to_process(struc if (!found) { log_verbose("VG name on command line not found in list of VGs: %s", sl->str); + /* work around for bsc#1193181 */ + if (!strcmp(cmd->name, "vgimportclone") && sl->str) { + dm_list_iterate_items_safe(vgnl, vgnl2, vgnameids_on_system) { + log_verbose("triggering vgimportclone work around, prefer VG: %s", + vgnl->vg_name); + dm_list_del(&vgnl->list); + dm_list_add(vgnameids_to_process, &vgnl->list); + + /* Make the arg_vgnames entry use the actual VG name. */ + sl->str = dm_pool_strdup(cmd->mem, vgnl->vg_name); + found = 1; + break; + } + break; + } + if (!(vgnl = dm_pool_alloc(cmd->mem, sizeof(*vgnl)))) continue;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor