Skip to contentSkip to conversation

master - vgrename: run fullscan

PATCH Zdenek Kabelac 1 participant 1 message Oct 8, 2013

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=30746f31dd1db63e0c83e6f8c7ae65dab3f69a4b
Commit:        30746f31dd1db63e0c83e6f8c7ae65dab3f69a4b
Parent:        4806f38d703c2d7cd01e0adc49505ccb7d010a17
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Tue Oct 8 11:15:05 2013 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Tue Oct 8 13:39:11 2013 +0200

vgrename: run fullscan

For vgrename run full scan so the command is able to properly detect name collision.

---
 WHATS_NEW        |    1 +
 tools/vgrename.c |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)
WHATS_NEW +1 -0
index 5b35890..93a156a 100644
@@ -1,6 +1,7 @@
 Version 2.02.104
 ===================================
   Improve message when unable to change discards setting on active thin pool.
+  Run full scan before vgrename operation to avoid any cache name collision.
 
 Version 2.02.103 - 4th October 2013
 ===================================
tools/vgrename.c +2 -0
index 154a6f3..b5e778f 100644
@@ -83,6 +83,8 @@ static int vg_rename_path(struct cmd_context *cmd, const char *old_vg_path,
 	if (!lvmetad_vg_list_to_lvmcache(cmd))
 		stack;
 
+	lvmcache_label_scan(cmd, 2);
+
 	/* Avoid duplicates */
 	if (!(vgids = get_vgids(cmd, 0)) || dm_list_empty(vgids)) {
 		log_error("No complete volume groups found");