master - snapshot: update merging fix
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=373f95a921223c...
Commit: 373f95a921223c1e4d36ae975ac685227369cf5b
Parent: 6311be29e40af21a53ef2a09a99867fc4460a73e
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Jul 23 15:15:04 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Jul 23 15:15:04 2013 +0200
snapshot: update merging fix
Activation is needed only for clustered VG.
For non-clustered VG skip activation, since deactivate_lv()
is called without problems (no testing for lock presence).
(updates f6ded62291682e40c7976d27e48915d9d1538940)
---
lib/metadata/snapshot_manip.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/lib/metadata/snapshot_manip.c b/lib/metadata/snapshot_manip.c
index ab28890..325a4e8 100644
--- a/lib/metadata/snapshot_manip.c
+++ b/lib/metadata/snapshot_manip.c
@@ -298,10 +298,12 @@ int vg_remove_snapshot(struct logical_volume *cow)
}
/*
- * For merged snapshot we activate cow so it can clean
- * left table entries and deactivate_lv() follows shortly.
+ * For merged snapshot and clustered VG activate cow LV so
+ * the following call to deactivate_lv() can clean-up table
+ * entries. For this clustered lock need to be held.
*/
- if (merging_snapshot && !activate_lv(cow->vg->cmd, cow)) {
+ if (vg_is_clustered(cow->vg) &&
+ merging_snapshot && !activate_lv(cow->vg->cmd, cow)) {
log_error("Failed to activate %s.", cow->name);
return 0;
}
10 years, 9 months
master - thin: use 64bit arithmetic for checking meta size
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6311be29e40af2...
Commit: 6311be29e40af21a53ef2a09a99867fc4460a73e
Parent: e0856393c8a1c622871b07fb452fbbd7c0da537a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Jul 23 10:46:50 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Jul 23 14:58:07 2013 +0200
thin: use 64bit arithmetic for checking meta size
Avoid overflow since extents are just 32bit values.
(in release fix 87aca628)
---
lib/metadata/lv_manip.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 8882a0a..9284c7b 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -3440,7 +3440,7 @@ static int _lvresize_poolmetadata(struct cmd_context *cmd, struct volume_group *
extents += lv->le_count;
}
- if (extents * vg->extent_size > DM_THIN_MAX_METADATA_SIZE) {
+ if ((uint64_t)extents * vg->extent_size > DM_THIN_MAX_METADATA_SIZE) {
log_print_unless_silent("Rounding size to maximum supported size 16GiB "
"for metadata volume %s.", lv->name);
extents = (DM_THIN_MAX_METADATA_SIZE + vg->extent_size - 1) /
10 years, 9 months
master - cleanup: add explicit cast to proper enum type
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e0856393c8a1c6...
Commit: e0856393c8a1c622871b07fb452fbbd7c0da537a
Parent: 9b1834f075daf0fb3f349356a31c1bfed421384a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Jul 23 10:46:07 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Jul 23 14:53:29 2013 +0200
cleanup: add explicit cast to proper enum type
---
liblvm/lvm_lv.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/liblvm/lvm_lv.c b/liblvm/lvm_lv.c
index 7fc2392..46399e4 100644
--- a/liblvm/lvm_lv.c
+++ b/liblvm/lvm_lv.c
@@ -443,7 +443,7 @@ lv_create_params_t lvm_lv_params_create_thin_pool(vg_t vg,
if (lvcp) {
lvcp->vg = vg;
- lvcp->lvp.discards = discard;
+ lvcp->lvp.discards = (thin_discards_t) discard;
if (chunk_size)
lvcp->lvp.chunk_size = chunk_size;
10 years, 9 months
master - man: pvs -o ba_start, ba_size -> pv_ba_start, pv_ba_size
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9b1834f075daf0...
Commit: 9b1834f075daf0fb3f349356a31c1bfed421384a
Parent: 83fb622598458e6814eb0d5dde23eda18c6ac620
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Jul 23 14:44:30 2013 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Jul 23 14:45:30 2013 +0200
man: pvs -o ba_start,ba_size -> pv_ba_start,pv_ba_size
---
WHATS_NEW | 2 +-
man/pvcreate.8.in | 2 +-
man/pvs.8.in | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 15419bb..0269839 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -111,7 +111,7 @@ Version 2.02.99 -
Add --withcomments and --withversions switch to lvm dumpconfig.
Add --type {current|default|missing|new} and --atversion to lvm dumpconfig.
Support automatic config validation and add 'config' section to lvm.conf.
- Add pvs -o ba_start,ba_size to report bootloader area start and size.
+ Add pvs -o pv_ba_start,pv_ba_size to report bootloader area start and size.
Add --bootloaderareasize to pvcreate and vgconvert to create a bootloader area.
Add PV header extension: extension version, flags and bootloader areas.
Initial support for lvconvert of thin external origin.
diff --git a/man/pvcreate.8.in b/man/pvcreate.8.in
index bd979aa..9353c6c 100644
--- a/man/pvcreate.8.in
+++ b/man/pvcreate.8.in
@@ -174,7 +174,7 @@ The start of the bootloader area is always aligned, see also \fB--dataalignment\
and \fB--dataalignmentoffset\fP. The bootloader area size may eventually
end up increased due to the alignment, but it's never less than the
size that is requested. To see the bootloader area start and size of
-an existing Physical Volume use \fBpvs -o +ba_start,ba_size\fP.
+an existing Physical Volume use \fBpvs -o +pv_ba_start,pv_ba_size\fP.
.TP
.B \-\-setphysicalvolumesize \fIsize
Overrides the automatically-detected size of the PV. Use with care.
diff --git a/man/pvs.8.in b/man/pvs.8.in
index 7ec724a..d1f6e8b 100644
--- a/man/pvs.8.in
+++ b/man/pvs.8.in
@@ -63,7 +63,7 @@ and \fB-o pvseg_all\fP to select all Physical Volume segment columns.
Use \fB-o help\fP to view the full list of columns available.
.IP
Column names include: pv_fmt, pv_uuid, dev_size, pv_name, pv_mda_free,
-pv_mda_size, ba_start, ba_size, pe_start, pv_size, pv_free, pv_used,
+pv_mda_size, pv_ba_start, pv_ba_size, pe_start, pv_size, pv_free, pv_used,
pv_attr, pv_pe_count, pv_pe_alloc_count, pv_tags, pv_mda_count,
pv_mda_used_count, pvseg_start, and pvseg_size
.IP
10 years, 9 months
master - deptree: don't remove live node on resume failure
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=83fb622598458e...
Commit: 83fb622598458e6814eb0d5dde23eda18c6ac620
Parent: 84801d7c34430052e298bc54826e18eb68212ec6
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Jul 23 13:33:35 2013 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Jul 23 13:33:35 2013 +0100
deptree: don't remove live node on resume failure
When resuming a node needed by a higher layer of the tree,
if the resume fails, only remove it if the node did not
originally have a live table.
Ref. 97f8454eccefe29464336ba1823448f4d1fa009b
---
libdm/libdm-deptree.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c
index 34cd960..57f00f6 100644
--- a/libdm/libdm-deptree.c
+++ b/libdm/libdm-deptree.c
@@ -2534,12 +2534,15 @@ int dm_tree_preload_children(struct dm_tree_node *dnode,
log_error("Unable to resume %s (%" PRIu32
":%" PRIu32 ")", child->name, child->info.major,
child->info.minor);
- if (!_deactivate_node(child->name, child->info.major, child->info.minor,
+ /* If the device was not previously active, we might as well remove this node. */
+ if (!child->info.live_table &&
+ !_deactivate_node(child->name, child->info.major,child->info.minor,
&child->dtree->cookie, child->udev_flags, 0))
log_error("Unable to deactivate %s (%" PRIu32
":%" PRIu32 ")", child->name, child->info.major,
child->info.minor);
r = 0;
+ /* Each child is handled independently */
continue;
}
10 years, 9 months
master - thin: rename extend_pool to create_pool
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=84801d7c344300...
Commit: 84801d7c34430052e298bc54826e18eb68212ec6
Parent: 3670fe92ba05c9555159ee887bc96e1da41e6682
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Jul 23 13:33:14 2013 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Jul 23 13:33:14 2013 +0100
thin: rename extend_pool to create_pool
---
lib/metadata/lv_manip.c | 2 +-
lib/metadata/metadata.h | 2 +-
lib/metadata/thin_manip.c | 10 +++++-----
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 16ad7e7..8882a0a 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -2868,7 +2868,7 @@ int lv_extend(struct logical_volume *lv,
if (segtype_is_thin_pool(segtype)) {
if (!lv->le_count) {
- if (!(r = extend_pool(lv, segtype, ah, stripes, stripe_size)))
+ if (!(r = create_pool(lv, segtype, ah, stripes, stripe_size)))
stack;
} else if (!(r = _lv_extend_layered_lv(ah, lv, extents, 0,
stripes, stripe_size)))
diff --git a/lib/metadata/metadata.h b/lib/metadata/metadata.h
index c2a20cb..2408c23 100644
--- a/lib/metadata/metadata.h
+++ b/lib/metadata/metadata.h
@@ -470,7 +470,7 @@ int attach_pool_message(struct lv_segment *pool_seg, dm_thin_message_t type,
int pool_has_message(const struct lv_segment *seg,
const struct logical_volume *lv, uint32_t device_id);
int pool_below_threshold(const struct lv_segment *pool_seg);
-int extend_pool(struct logical_volume *lv, const struct segment_type *segtype,
+int create_pool(struct logical_volume *lv, const struct segment_type *segtype,
struct alloc_handle *ah, uint32_t stripes, uint32_t stripe_size);
/*
diff --git a/lib/metadata/thin_manip.c b/lib/metadata/thin_manip.c
index 38073ee..35e1ec7 100644
--- a/lib/metadata/thin_manip.c
+++ b/lib/metadata/thin_manip.c
@@ -425,8 +425,7 @@ uint32_t get_free_pool_device_id(struct lv_segment *thin_pool_seg)
return max_id;
}
-// FIXME Rename this fn: it doesn't extend an already-existing pool AFAICT
-int extend_pool(struct logical_volume *pool_lv, const struct segment_type *segtype,
+int create_pool(struct logical_volume *pool_lv, const struct segment_type *segtype,
struct alloc_handle *ah, uint32_t stripes, uint32_t stripe_size)
{
const struct segment_type *striped;
@@ -455,7 +454,9 @@ int extend_pool(struct logical_volume *pool_lv, const struct segment_type *segty
if (!lv_add_segment(ah, stripes, 1, pool_lv, striped, 1, 0, 0))
return_0;
- if (activation()) {
+ if (!activation())
+ log_warn("WARNING: Pool %s is created without initialization.", pool_lv->name);
+ else {
if (!vg_write(pool_lv->vg) || !vg_commit(pool_lv->vg))
return_0;
@@ -474,8 +475,6 @@ int extend_pool(struct logical_volume *pool_lv, const struct segment_type *segty
pool_lv->name);
goto bad;
}
- } else {
- log_warn("WARNING: Pool %s is created without initialization.", pool_lv->name);
}
if (dm_snprintf(name, sizeof(name), "%s_tmeta", pool_lv->name) < 0) {
@@ -512,6 +511,7 @@ int extend_pool(struct logical_volume *pool_lv, const struct segment_type *segty
goto_bad;
return 1;
+
bad:
if (activation()) {
if (deactivate_lv_local(pool_lv->vg->cmd, pool_lv)) {
10 years, 9 months
master - cleanup: suppress compiler warning
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3670fe92ba05c9...
Commit: 3670fe92ba05c9555159ee887bc96e1da41e6682
Parent: eb5a6a0d1a867aa793e68f99c9a01027b182af65
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Jul 23 13:32:47 2013 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Jul 23 13:32:47 2013 +0100
cleanup: suppress compiler warning
---
tools/lvchange.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/lvchange.c b/tools/lvchange.c
index 3b40659..3ba78e6 100644
--- a/tools/lvchange.c
+++ b/tools/lvchange.c
@@ -749,10 +749,10 @@ static int lvchange_writemostly(struct logical_volume *lv)
return_0;
if (tmp_str_len < 3 ||
- (tmp_str[tmp_str_len - 2] != ':') &&
- ((tmp_str[tmp_str_len - 1] != 't') ||
- (tmp_str[tmp_str_len - 1] != 'y') ||
- (tmp_str[tmp_str_len - 1] != 'n')))
+ ((tmp_str[tmp_str_len - 2] != ':') &&
+ ((tmp_str[tmp_str_len - 1] != 't') ||
+ (tmp_str[tmp_str_len - 1] != 'y') ||
+ (tmp_str[tmp_str_len - 1] != 'n'))))
/* Default to 'y' if no mode specified */
sprintf(pv_names[i], "%s:y", tmp_str);
else
10 years, 9 months
master - Man Pages: Update man pages to reflect changes to various RAID options
by Jonathan Brassow
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=eb5a6a0d1a867a...
Commit: eb5a6a0d1a867aa793e68f99c9a01027b182af65
Parent: f6ded62291682e40c7976d27e48915d9d1538940
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Mon Jul 22 13:02:32 2013 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Mon Jul 22 13:02:32 2013 -0500
Man Pages: Update man pages to reflect changes to various RAID options
Some of the names for various RAID options have been changed and the man
pages need to reflect it.
lvcreate:
from: minrecoveryrate to: [raid]minrecoveryrate
from: maxrecoveryrate to: [raid]maxrecoveryrate
* plus better clarity on what the arg to these options is
specifying
lvchange:
from: minrecoveryrate to: [raid]minrecoveryrate
from: maxrecoveryrate to: [raid]maxrecoveryrate
* plus better clarity on what the arg to these options is
specifying
from: syncaction to: [raid]syncaction
from: writebehind to [raid]writebehind
* plus change arg from BehindCount to IO/count
from: writemostly to: [raid]writemostly
* plus addition to document [:{t|n|y}] option
lvs:
from: mismatches to: raid_mismatch_count
from: sync_action to: raid_sync_action
add : raid_min|max_recovery_rate, raid_write_behind
---
man/lvchange.8.in | 68 +++++++++++++++++++++++++++-------------------------
man/lvcreate.8.in | 20 +++++++-------
man/lvs.8.in | 7 ++++-
3 files changed, 50 insertions(+), 45 deletions(-)
diff --git a/man/lvchange.8.in b/man/lvchange.8.in
index 3b6c574..ea8a6ef 100644
--- a/man/lvchange.8.in
+++ b/man/lvchange.8.in
@@ -31,12 +31,16 @@ lvchange \- change attributes of a logical volume
.RI { y | n }]
.RB [ \-\-poll
.RI { y | n }]
-.RB [ \-\-maxrecoveryrate
+.RB [ \-\-[raid]maxrecoveryrate
.IR Rate ]
-.RB [ \-\-minrecoveryrate
+.RB [ \-\-[raid]minrecoveryrate
.IR Rate ]
-.RB [ \-\-syncaction
+.RB [ \-\-[raid]syncaction
.RI { check | repair }]
+.RB [ \-\-[raid]writebehind
+.IR IOCount ]
+.RB [ \-\-[raid]writemostly
+.IR PhysicalVolume[:{t|n|y}] ]
.RB [ \-\-sysinit ]
.RB [ \-\-noudevsync ]
.RB [ \-M | \-\-persistent
@@ -51,8 +55,6 @@ lvchange \- change attributes of a logical volume
.RB [ \-\-refresh ]
.RB [ \-t | \-\-test ]
.RB [ \-v | \-\-verbose ]
-.RB [ \-\-writebehind BehindCount ]
-.RB [ \-\-writemostly PhysicalVolume ]
.RB [ \-Z | \-\-zero
.RI { y | n }]
.I LogicalVolumePath
@@ -138,19 +140,19 @@ process from its last checkpoint. However, it may not be appropriate to
immediately poll a logical volume when it is activated, use
\fB\-\-poll n\fP to defer and then \fB\-\-poll y\fP to restart the process.
.TP
-.IR \fB\-\-maxrecoveryrate " " \fIRate [ bBsSkKmMgG ]
+.IR \fB\-\-[raid]maxrecoveryrate " " \fIRate [ bBsSkKmMgG ]
Sets the maximum recovery rate for a RAID logical volume. \fIRate\fP
-is specified as a size/sec/device. If no suffix is given, then
-kiB/sec/device is assumed. Setting the recovery rate to 0 means
-it will be unbounded.
+is specified as an amount per second for each device in the array.
+If no suffix is given, then kiB/sec/device is assumed. Setting the
+recovery rate to 0 means it will be unbounded.
.TP
-.IR \fB\-\-minrecoveryrate " " \fIRate [ bBsSkKmMgG ]
+.IR \fB\-\-[raid]minrecoveryrate " " \fIRate [ bBsSkKmMgG ]
Sets the minimum recovery rate for a RAID logical volume. \fIRate\fP
-is specified as a size/sec/device. If no suffix is given, then
-kiB/sec/device is assumed. Setting the recovery rate to 0 means
-it will be unbounded.
+is specified as an amount per second for each device in the array.
+If no suffix is given, then kiB/sec/device is assumed. Setting the
+recovery rate to 0 means it will be unbounded.
.TP
-.BR \-\-syncaction " {" \fIcheck | \fIrepair }
+.BR \-\-[raid]syncaction " {" \fIcheck | \fIrepair }
This argument is used to initiate various RAID synchronization operations.
The \fIcheck\fP and \fIrepair\fP options provide a way to check the
integrity of a RAID logical volume (often referred to as "scrubbing").
@@ -162,6 +164,25 @@ If \fIrepair\fP is used, the discrepancies will be corrected as they are
encountered. The 'lvs' command can be used to show the number of
discrepancies found or repaired.
.TP
+.BR \-\-[raid]writebehind " IOCount"
+Specify the maximum number of outstanding writes that are allowed to
+devices in a RAID1 logical volume that are marked as \fIwrite-mostly\fP.
+Once this value is exceeded, writes become synchronous (i.e. all writes
+to the constituent devices must complete before the array signals the
+write has completed). Setting the value to zero clears the preference
+and allows the system to choose the value arbitrarily.
+.TP
+.BR \-\-[raid]writemostly " PhysicalVolume[:{t|y|n}]"
+Mark a device in a RAID1 logical volume as \fIwrite-mostly\fP. All reads
+to these drives will be avoided unless absolutely necessary. This keeps
+the number of I/Os to the drive to a minimum. The default behavior is to
+set the write-mostly attribute for the specified physical volume in the
+logical volume. It is possible to also remove the write-mostly flag by
+appending a ":n" to the physical volume or to toggle the value by specifying
+":t". The \fI--writemostly\fP argument can be specified more than one time
+in a single command; making it possible to toggle the write-mostly attributes
+for all the physical volumes in a logical volume at once.
+.TP
.B \-\-sysinit
Indicates that \fBlvchange\fP(8) is being invoked from early system
initialisation scripts (e.g. rc.sysinit or an initrd),
@@ -210,25 +231,6 @@ This is not necessary in normal operation, but may be useful
if something has gone wrong or if you're doing clustering
manually without a clustered lock manager.
.TP
-.BR \-\-writebehind " BehindCount"
-Specify the maximum number of outstanding writes that are allowed to
-devices in a RAID 1 logical volume that are marked as \fIwrite-mostly\fP.
-Once this value is exceeded, writes become synchronous (i.e. all writes
-to the constituent devices must complete before the array signals the
-write has completed). Setting the value to zero clears the preference
-and allows the system to choose the value arbitrarily.
-.TP
-.BR \-\-writemostly " PhysicalVolume[:{t|y|n}]"
-Mark a device in a RAID1 logical volume as \fIwrite-mostly\fP. All reads
-to these drives will be avoided unless absolutely necessary. This keeps
-the number of I/Os to the drive to a minimum. The default behavior is to
-set the write-mostly attribute for the specified physical volume in the
-logical volume. It is possible to also remove the write-mostly flag by
-appending a ":n" to the physical volume or to toggle the value by specifying
-":t". The \fI--writemostly\fP argument can be specified more than one time
-in a single command; making it possible to toggle the write-mostly attributes
-for all the physical volumes in a logical volume at once.
-.TP
.BR \-Z ", " \-\-zero " {" \fIy | \fIn }
Set zeroing mode for thin pool. Note: already provisioned blocks from pool
in non-zero mode are not cleared in unwritten parts when setting zero to
diff --git a/man/lvcreate.8.in b/man/lvcreate.8.in
index ecbf363..681ff68 100644
--- a/man/lvcreate.8.in
+++ b/man/lvcreate.8.in
@@ -22,9 +22,9 @@ lvcreate \- create a logical volume in an existing volume group
.RB [ \-\-ignoremonitoring ]
.RB [ \-\-monitor
.RI { y | n }]
-.RB [ \-\-maxrecoveryrate
+.RB [ \-\-[raid]maxrecoveryrate
.IR Rate ]
-.RB [ \-\-minrecoveryrate
+.RB [ \-\-[raid]minrecoveryrate
.IR Rate ]
.RB [ \-i | \-\-stripes
.IR Stripes
@@ -265,17 +265,17 @@ Sets the name for the new logical volume.
Without this option a default name of "lvol#" will be generated where
# is the LVM internal number of the logical volume.
.TP
-.IR \fB\-\-maxrecoveryrate " " \fIRate [ bBsSkKmMgG ]
+.IR \fB\-\-[raid]maxrecoveryrate " " \fIRate [ bBsSkKmMgG ]
Sets the maximum recovery rate for a RAID logical volume. \fIRate\fP
-is specified as a size/sec/device. If no suffix is given, then
-kiB/sec/device is assumed. Setting the recovery rate to 0 means
-it will be unbounded.
+is specified as an amount per second for each device in the array.
+If no suffix is given, then kiB/sec/device is assumed. Setting the
+recovery rate to 0 means it will be unbounded.
.TP
-.IR \fB\-\-minrecoveryrate " " \fIRate [ bBsSkKmMgG ]
+.IR \fB\-\-[raid]minrecoveryrate " " \fIRate [ bBsSkKmMgG ]
Sets the minimum recovery rate for a RAID logical volume. \fIRate\fP
-is specified as a size/sec/device. If no suffix is given, then
-kiB/sec/device is assumed. Setting the recovery rate to 0 means
-it will be unbounded.
+is specified as an amount per second for each device in the array.
+If no suffix is given, then kiB/sec/device is assumed. Setting the
+recovery rate to 0 means it will be unbounded.
.TP
.B \-\-noudevsync
Disables udev synchronisation. The
diff --git a/man/lvs.8.in b/man/lvs.8.in
index 4da4370..8f97dc2 100644
--- a/man/lvs.8.in
+++ b/man/lvs.8.in
@@ -98,12 +98,16 @@ lv_time,
lv_uuid,
metadata_lv,
mirror_log,
-mismatches,
modules,
move_pv,
origin,
origin_size,
pool_lv,
+raid_max_recovery_rate,
+raid_min_recovery_rate,
+raid_mismatch_count,
+raid_sync_action,
+raid_write_behind,
region_size,
segtype,
seg_count,
@@ -115,7 +119,6 @@ seg_tags,
snap_percent,
stripes,
stripe_size,
-sync_action,
sync_percent,
thin_count,
transaction_id,
10 years, 9 months
master - snapshot: fix merging
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f6ded62291682e...
Commit: f6ded62291682e40c7976d27e48915d9d1538940
Parent: 6ca81a091c5a79bee0ec46c21aea643907ab2ca7
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Jul 22 16:20:36 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Jul 22 16:26:00 2013 +0200
snapshot: fix merging
When the merging of snapshot is finished, we need to clean dm table
intries for snapshot and -cow device. So for merging snapshot
we have to activate_lv plain 'cow' LV and let the table
resolver to its work - shortly deactivation_lv() request
will follow - in cluster this needs LV lock to be held by clvmd.
Also update a test - add small wait - if lvremove is not 'fast enough'
and merging process has not been stopped and $lv1 removed in background.
Ortherwise the following lvcreate occasionally finds name $lv1 still in use.
(in release fix)
---
lib/metadata/snapshot_manip.c | 9 +++++++++
test/shell/snapshot-merge.sh | 6 ++++++
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/lib/metadata/snapshot_manip.c b/lib/metadata/snapshot_manip.c
index f949b23..ab28890 100644
--- a/lib/metadata/snapshot_manip.c
+++ b/lib/metadata/snapshot_manip.c
@@ -296,6 +296,15 @@ int vg_remove_snapshot(struct logical_volume *cow)
log_error("Failed to resume %s.", origin->name);
return 0;
}
+
+ /*
+ * For merged snapshot we activate cow so it can clean
+ * left table entries and deactivate_lv() follows shortly.
+ */
+ if (merging_snapshot && !activate_lv(cow->vg->cmd, cow)) {
+ log_error("Failed to activate %s.", cow->name);
+ return 0;
+ }
}
return 1;
diff --git a/test/shell/snapshot-merge.sh b/test/shell/snapshot-merge.sh
index 6e59ea7..0713934 100644
--- a/test/shell/snapshot-merge.sh
+++ b/test/shell/snapshot-merge.sh
@@ -78,6 +78,12 @@ dm_table $vg-$lv1 | grep " snapshot-merge " || dm_table $vg-$lv1 | grep " linear
# may test stopping an active merge
lvremove -f $vg/$lv1
+# wait a while if the merge and remove is still not finished
+# since it may still keep $lv1 in vg being present
+for i in 1 2 3 4 ; do
+ lvs $vg/$lv1 2>/dev/null || break;
+ sleep .2
+done
# "onactivate merge" test
# -- deactivate/remove after disallowed merge attempt, tests
10 years, 9 months
master - tests: comment about pvscan --cache return value
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6ca81a091c5a79...
Commit: 6ca81a091c5a79bee0ec46c21aea643907ab2ca7
Parent: 081308af30b32b86b690c727125f0615e5a7a7fb
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Mon Jul 22 15:57:18 2013 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Mon Jul 22 15:57:18 2013 +0200
tests: comment about pvscan --cache return value
---
test/shell/lvmetad-pvscan-filter.sh | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/test/shell/lvmetad-pvscan-filter.sh b/test/shell/lvmetad-pvscan-filter.sh
index 5dd66c4..5aed532 100644
--- a/test/shell/lvmetad-pvscan-filter.sh
+++ b/test/shell/lvmetad-pvscan-filter.sh
@@ -20,7 +20,12 @@ min=$(($(stat --printf=0x%T "$dev2")))
aux hide_dev $dev2
not pvscan --cache $dev2 2>&1 | grep "not found"
-# pvscan with --major/--minor does not fail (for udev's sake?)
+# pvscan with --major/--minor does not fail: lvmetad needs to
+# be notified about device removal on REMOVE uevent, hence
+# this should not fail so udev does not grab a "failed" state
+# incorrectly. We notify device addition and removal with
+# exactly the same command "pvscan --cache" - in case of removal,
+# this is detected by nonexistence of the device itself.
pvscan --cache --major $maj --minor $min 2>&1 | grep "not found"
aux unhide_dev $dev2
10 years, 9 months