mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +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 -
|
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.
|
dumpconfig accepts a list of configuration variables to display.
|
||||||
Change dumpconfig to use --file to redirect output to a file.
|
Change dumpconfig to use --file to redirect output to a file.
|
||||||
Avoid vgreduce error when mirror code removes the log LV.
|
Avoid vgreduce error when mirror code removes the log LV.
|
||||||
|
@ -1,20 +1,35 @@
|
|||||||
.TH LVCONVERT 8 "LVM TOOLS" "Red Hat, Inc" \" -*- nroff -*-
|
.TH LVCONVERT 8 "LVM TOOLS" "Red Hat, Inc" \" -*- nroff -*-
|
||||||
.SH NAME
|
.SH NAME
|
||||||
lvconvert \- convert a logical volume between linear and mirror
|
lvconvert \- convert a logical volume from linear to mirror or snapshot
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B lvconvert
|
.B lvconvert
|
||||||
[\-m/\-\-mirrors Mirrors [\-\-corelog] [\-R/\-\-regionsize MirrorLogRegionSize]]
|
\-m/\-\-mirrors Mirrors [\-\-corelog] [\-R/\-\-regionsize MirrorLogRegionSize]
|
||||||
[\-A/\-\-alloc AllocationPolicy]
|
[\-A/\-\-alloc AllocationPolicy]
|
||||||
[\-h/\-?/\-\-help]
|
[\-h/\-?/\-\-help]
|
||||||
[\-v/\-\-verbose]
|
[\-v/\-\-verbose]
|
||||||
[\-\-version]
|
[\-\-version]
|
||||||
|
.br
|
||||||
LogicalVolume[Path] [PhysicalVolume[Path]...]
|
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
|
.SH DESCRIPTION
|
||||||
lvconvert will change a linear logical volume to a mirror
|
lvconvert will change a linear logical volume to a mirror
|
||||||
logical volume or vis versa. It is also used to add and
|
logical volume or to a snapshot of linear volume and vice versa.
|
||||||
remove disk logs from mirror devices.
|
It is also used to add and remove disk logs from mirror devices.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
See \fBlvm\fP for common options.
|
See \fBlvm\fP for common options.
|
||||||
|
.br
|
||||||
|
Exactly one of \-\-mirrors or \-\-snapshot arguments required.
|
||||||
|
.br
|
||||||
.TP
|
.TP
|
||||||
.I \-m, \-\-mirrors Mirrors
|
.I \-m, \-\-mirrors Mirrors
|
||||||
Specifies the degree of the mirror you wish to create.
|
Specifies the degree of the mirror you wish to create.
|
||||||
@ -32,6 +47,19 @@ the mirror you are changing.
|
|||||||
.I \-R, \-\-regionsize MirrorLogRegionSize
|
.I \-R, \-\-regionsize MirrorLogRegionSize
|
||||||
A mirror is divided into regions of this size (in MB), and the mirror log
|
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.
|
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
|
.SH Examples
|
||||||
"lvconvert -m1 vg00/lvol1"
|
"lvconvert -m1 vg00/lvol1"
|
||||||
.br
|
.br
|
||||||
@ -49,6 +77,12 @@ two-way mirror with an in-memory log.
|
|||||||
.br
|
.br
|
||||||
converts a mirror logical volume to a linear logical
|
converts a mirror logical volume to a linear logical
|
||||||
volume.
|
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
|
.SH SEE ALSO
|
||||||
.BR lvm (8),
|
.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.
|
Controls zeroing of the first KB of data in the new logical volume.
|
||||||
.br
|
.br
|
||||||
Default is yes.
|
Default is yes.
|
||||||
|
.br
|
||||||
|
Volume will not be zeroed if read only flag is set.
|
||||||
|
.br
|
||||||
|
Snapshot volumes are zeroed always.
|
||||||
|
|
||||||
.br
|
.br
|
||||||
Warning: trying to mount an unzeroed logical volume can cause the system to
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!lp->zero)
|
if (!lp->zero || !(lv->status & LVM_WRITE))
|
||||||
log_error("WARNING: \"%s\" not zeroed", lv->name);
|
log_print("WARNING: \"%s\" not zeroed", lv->name);
|
||||||
else if (!set_lv(cmd, lv, 0, 0)) {
|
else if (!set_lv(cmd, lv, 0, 0)) {
|
||||||
log_error("Aborting. Failed to wipe snapshot "
|
log_error("Aborting. Failed to wipe snapshot "
|
||||||
"exception store.");
|
"exception store.");
|
||||||
|
@ -434,6 +434,10 @@ static int _lvcreate_params(struct lvcreate_params *lp, struct cmd_context *cmd,
|
|||||||
else
|
else
|
||||||
lp->permission = LVM_READ | LVM_WRITE;
|
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->minor = arg_int_value(cmd, minor_ARG, -1);
|
||||||
lp->major = arg_int_value(cmd, major_ARG, -1);
|
lp->major = arg_int_value(cmd, major_ARG, -1);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user