Skip to contentSkip to conversation

LVM2 ./WHATS_NEW man/lvconvert.8 man/lvcreate. ...

PATCH [email protected] 1 participant 1 message Jan 10, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz at sourceware.org 2007-01-10 14:13:46

Modified files:

	.              : WHATS_NEW 
	man            : lvconvert.8 lvcreate.8 
	tools          : lvconvert.c lvcreate.c 

Log message:
Print warning instead of error message if cannot zero volume Update lvconvert man page (snapshot option)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.532&r2=1.533
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/man/lvconvert.8.diff?cvsroot=lvm2&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/man/lvcreate.8.diff?cvsroot=lvm2&r1=1.13&r2=1.14
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvconvert.c.diff?cvsroot=lvm2&r1=1.24&r2=1.25
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvcreate.c.diff?cvsroot=lvm2&r1=1.131&r2=1.132

WHATS_NEW +2 -0
@@ -1,5 +1,7 @@
 Version 2.02.18 -
 ====================================
+  Print warning instead of error message if cannot zero volume
+  Update lvconvert man page (snapshot option)
   dumpconfig accepts a list of configuration variables to display.
   Change dumpconfig to use --file to redirect output to a file.
   Avoid vgreduce error when mirror code removes the log LV.
man/lvconvert.8 +38 -4

70 lines not on this page · raw message

man/lvcreate.8 +4 -0
@@ -139,6 +139,10 @@
 Controls zeroing of the first KB of data in the new logical volume.
 .br
 Default is yes.
+.br
+Volume will not be zeroed if read only flag is set.
+.br
+Snapshot volumes are zeroed always.
 
 .br
 Warning: trying to mount an unzeroed logical volume can cause the system to
tools/lvconvert.c +2 -2
@@ -446,8 +446,8 @@
 		return 0;
 	}
 
-	if (!lp->zero)
-		log_error("WARNING: \"%s\" not zeroed", lv->name);
+	if (!lp->zero || !(lv->status & LVM_WRITE))
+		log_print("WARNING: \"%s\" not zeroed", lv->name);
 	else if (!set_lv(cmd, lv, 0, 0)) {
 			log_error("Aborting. Failed to wipe snapshot "
 				  "exception store.");
tools/lvcreate.c +4 -0
@@ -434,6 +434,10 @@
 	else
 		lp->permission = LVM_READ | LVM_WRITE;
 
+	/* Must not zero read only volume */
+	if (!(lp->permission & LVM_WRITE))
+		lp->zero = 0;
+
 	lp->minor = arg_int_value(cmd, minor_ARG, -1);
 	lp->major = arg_int_value(cmd, major_ARG, -1);