Skip to contentSkip to conversation

Fix "lvremove -f vgname" when vgname contains snapshots.

PATCH New Dave Wysochanski 1 participant 1 message Nov 17, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix "lvremove -f vgname" when vgname contains snapshots.

Prior to this patch, "lvremove -f vgname" would fail if vgname contained one or more snapshot LVs. Now this passes, but has a side-effect. If you issue "lvremove vgname" where vgname contains one or more snaps, you will get an extra "y/n" prompt to remove the same snapshot.

---
 WHATS_NEW        |    1 +
 tools/lvremove.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
WHATS_NEW +1 -0
index 519802f..4439546 100644
@@ -1,5 +1,6 @@
 Version 2.02.43 - 10th November 2008
 ====================================
+  Fix "lvremove -f vgname" when vgname contains snapshots.
   Make man pages consistent with either-or options (use "|" everywhere).
   Merge device-mapper into the lvm2 tree.
   Correct prototype for --permission on lvchange and lvcreate man pages.
tools/lvremove.c +1 -1
index 24278b2..8b8401d 100644
@@ -18,7 +18,7 @@
 static int lvremove_single(struct cmd_context *cmd, struct logical_volume *lv,
 			   void *handle __attribute((unused)))
 {
-	if (!lv_remove_single(cmd, lv, arg_count(cmd, force_ARG)))
+	if (!lv_remove_with_dependencies(cmd, lv, arg_count(cmd, force_ARG)))
 		return ECMD_FAILED;
 
 	return ECMD_PROCESSED;
Signature · 1 line
1.5.5.1