mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Print warning instead of error message if cannot zero volume
Update lvconvert man page (snapshot option)
This commit is contained in:
parent
2eeb2a1f54
commit
e0096cabef
@ -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.
|
||||
|
@ -1,20 +1,35 @@
|
||||
.TH LVCONVERT 8 "LVM TOOLS" "Red Hat, Inc" \" -*- nroff -*-
|
||||
.SH NAME
|
||||
lvconvert \- convert a logical volume between linear and mirror
|
||||
lvconvert \- convert a logical volume from linear to mirror or snapshot
|
||||
.SH SYNOPSIS
|
||||
.B lvconvert
|
||||
[\-m/\-\-mirrors Mirrors [\-\-corelog] [\-R/\-\-regionsize MirrorLogRegionSize]]
|
||||
\-m/\-\-mirrors Mirrors [\-\-corelog] [\-R/\-\-regionsize MirrorLogRegionSize]
|
||||
[\-A/\-\-alloc AllocationPolicy]
|
||||
[\-h/\-?/\-\-help]
|
||||
[\-v/\-\-verbose]
|
||||
[\-\-version]
|
||||
.br
|
||||
LogicalVolume[Path] [PhysicalVolume[Path]...]
|
||||
.br
|
||||
|
||||
.br
|
||||
.B lvconvert
|
||||
\-s/\-\-snapshot [\-c/\-\-chunksize ChunkSize]
|
||||
[\-h/\-?/\-\-help]
|
||||
[\-v/\-\-verbose]
|
||||
[\-Z/\-\-zero y/n]
|
||||
[\-\-version]
|
||||
.br
|
||||
OriginalLogicalVolume[Path] SnapshotLogicalVolume[Path]
|
||||
.SH DESCRIPTION
|
||||
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.
|
||||
.SH OPTIONS
|
||||
See \fBlvm\fP for common options.
|
||||
.br
|
||||
Exactly one of \-\-mirrors or \-\-snapshot arguments required.
|
||||
.br
|
||||
.TP
|
||||
.I \-m, \-\-mirrors Mirrors
|
||||
Specifies the degree of the mirror you wish to create.
|
||||
@ -32,6 +47,19 @@ the mirror you are changing.
|
||||
.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.
|
||||
.br
|
||||
.TP
|
||||
.I \-s, \-\-snapshot
|
||||
Create a snapshot from existing logical volume using another
|
||||
existing logical volume as its origin.
|
||||
.TP
|
||||
.I \-c, \-\-chunksize ChunkSize
|
||||
Power of 2 chunk size for the snapshot logical volume between 4k and 512k.
|
||||
.TP
|
||||
.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.
|
||||
.br
|
||||
.SH Examples
|
||||
"lvconvert -m1 vg00/lvol1"
|
||||
.br
|
||||
@ -49,6 +77,12 @@ two-way mirror with an in-memory log.
|
||||
.br
|
||||
converts a mirror logical volume to a linear logical
|
||||
volume.
|
||||
.br
|
||||
|
||||
.br
|
||||
"lvconvert -s vg00/lvol1 vg00/lvol2"
|
||||
.br
|
||||
converts logical volume "vg00/lvol2" to snapshot of original volume "vg00/lvol1"
|
||||
|
||||
.SH SEE ALSO
|
||||
.BR lvm (8),
|
||||
|
@ -139,6 +139,10 @@ on the snapshot in order to check how much data is allocated to it.
|
||||
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
|
||||
|
@ -446,8 +446,8 @@ static int lvconvert_snapshot(struct cmd_context *cmd,
|
||||
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.");
|
||||
|
@ -434,6 +434,10 @@ static int _lvcreate_params(struct lvcreate_params *lp, struct cmd_context *cmd,
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user