public inbox for
help / color / mirror / Atom feed
Subject: LVM2 ./WHATS_NEW man/lvconvert.8 man/lvcreate. ...
Date: Wed, 10 Jan 2007 14:13:00 -0000	[thread overview]
Message-ID: <> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	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)


--- LVM2/WHATS_NEW	2007/01/09 23:22:31	1.532
+++ LVM2/WHATS_NEW	2007/01/10 14:13:46	1.533
@@ -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.
--- LVM2/man/lvconvert.8	2006/10/07 10:47:05	1.3
+++ LVM2/man/lvconvert.8	2007/01/10 14:13:46	1.4
@@ -1,20 +1,35 @@
 .TH LVCONVERT 8 "LVM TOOLS" "Red Hat, Inc" \" -*- nroff -*-
-lvconvert \- convert a logical volume between linear and mirror
+lvconvert \- convert a logical volume from linear to mirror or snapshot
 .B lvconvert
-[\-m/\-\-mirrors Mirrors [\-\-corelog] [\-R/\-\-regionsize MirrorLogRegionSize]]
+\-m/\-\-mirrors Mirrors [\-\-corelog] [\-R/\-\-regionsize MirrorLogRegionSize]
 [\-A/\-\-alloc AllocationPolicy]
 LogicalVolume[Path] [PhysicalVolume[Path]...]
+.B lvconvert
+\-s/\-\-snapshot [\-c/\-\-chunksize ChunkSize]
+[\-Z/\-\-zero y/n]
+OriginalLogicalVolume[Path] SnapshotLogicalVolume[Path]
 lvconvert will change a linear logical volume to a mirror
-logical volume or vis versa.  It is also used to add and
-remove disk logs from mirror devices.
+logical volume or to a snapshot of linear volume and vice versa.
+It is also used to add and remove disk logs from mirror devices.
 See \fBlvm\fP for common options.
+Exactly one of \-\-mirrors or \-\-snapshot arguments required.
 .I \-m, \-\-mirrors Mirrors
 Specifies the degree of the mirror you wish to create.
@@ -32,6 +47,19 @@
 .I \-R, \-\-regionsize MirrorLogRegionSize
 A mirror is divided into regions of this size (in MB), and the mirror log
 uses this granularity to track which regions are in sync.
+.I \-s, \-\-snapshot
+Create a snapshot from existing logical volume using another
+existing logical volume as its origin.
+.I \-c, \-\-chunksize ChunkSize
+Power of 2 chunk size for the snapshot logical volume between 4k and 512k.
+.I \-Z, \-\-zero y/n
+Controls zeroing of the first KB of data in the snapshot.
+If the volume is read only snapshot will not be zeroed.
 .SH Examples
 "lvconvert -m1 vg00/lvol1"
@@ -49,6 +77,12 @@
 converts a mirror logical volume to a linear logical
+"lvconvert -s vg00/lvol1 vg00/lvol2"
+converts logical volume "vg00/lvol2" to snapshot of original volume "vg00/lvol1"
 .BR lvm (8),
--- LVM2/man/lvcreate.8	2006/11/10 18:24:11	1.13
+++ LVM2/man/lvcreate.8	2007/01/10 14:13:46	1.14
@@ -139,6 +139,10 @@
 Controls zeroing of the first KB of data in the new logical volume.
 Default is yes.
+Volume will not be zeroed if read only flag is set.
+Snapshot volumes are zeroed always.
 Warning: trying to mount an unzeroed logical volume can cause the system to
--- LVM2/tools/lvconvert.c	2006/12/13 03:39:58	1.24
+++ LVM2/tools/lvconvert.c	2007/01/10 14:13:46	1.25
@@ -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.");
--- LVM2/tools/lvcreate.c	2006/11/10 18:24:11	1.131
+++ LVM2/tools/lvcreate.c	2007/01/10 14:13:46	1.132
@@ -434,6 +434,10 @@
 		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);

             reply	other threads:[~2007-01-10 14:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-10 14:13 mbroz [this message]
2007-08-01 21:01 jbrassow
2007-08-30 19:34 agk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).