Skip to contentSkip to conversation

LVM2/tools lvconvert.c

PATCH [email protected] 1 participant 1 message Jun 10, 2009

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall at sourceware.org 2009-06-10 15:27:57

Modified files:
tools : lvconvert.c

Log message:
Complain when lvconvert --repair is used on non-mirror LV.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvconvert.c.diff?cvsroot=lvm2&r1=1.78&r2=1.79

tools/lvconvert.c +5 -0
@@ -894,6 +894,11 @@
 		return ECMD_FAILED;
 	}
 
+	if (arg_count(cmd, repair_ARG) && !(lv->status & MIRRORED)) {
+		log_error("Can't repair non-mirrored LV \"%s\".", lv->name);
+		return ECMD_FAILED;
+	}
+
 	if (lp->snapshot) {
 		if (lv->status & MIRRORED) {
 			log_error("Unable to convert mirrored LV \"%s\" into a snapshot.", lv->name);