Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d53bfae273677975bd805…
Commit: d53bfae273677975bd805bfaa3d7e7cd995aaa52
Parent: 2f6d0a6408220a1f6a96a9f39779846578d88b8c
Author: Heming Zhao <heming.zhao(a)suse.com>
AuthorDate: Wed Jan 15 02:44:30 2020 +0000
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Jan 15 09:46:54 2020 -0600
add suggestion message for mirror LVs
Currently the error messages are not clear. This very easy to
guide user to execute "--removemissing --force", it is dangerous
and will make the LVs to be destroied.
Signed-off-by: Zhao Heming <heming.zhao(a)suse.com>
---
tools/vgreduce.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/vgreduce.c b/tools/vgreduce.c
index b001ccb..4a4202e 100644
--- a/tools/vgreduce.c
+++ b/tools/vgreduce.c
@@ -67,6 +67,8 @@ static int _consolidate_vg(struct cmd_context *cmd, struct volume_group *vg)
cmd->handles_missing_pvs = 1;
log_error("There are still partial LVs in VG %s.", vg->name);
log_error("To remove them unconditionally use: vgreduce --removemissing --force.");
+ log_error("To remove them unconditionally from mirror LVs use: vgreduce"
+ " --removemissing --mirrorsonly --force.");
log_warn("WARNING: Proceeding to remove empty missing PVs.");
}
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=5ccf3e6f30479331b9b47…
Commit: 5ccf3e6f30479331b9b47e0165ed191fbaa38f44
Parent: 7737ffb11ceba0f4220e1dfb79b8e97f20e7b8e9
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Jan 6 15:57:08 2020 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Jan 13 17:42:31 2020 +0100
vdo: avoid running initialization of cache pool vars
Since VDO is also pool, the old if() case missed to know about this,
and executed unnecesserily initialization of cache pool variables.
This was usually harmless when using 'smaller' sizes of VDO pools,
but for big VDO pool size, we were reporting senseless messages
about big cache chunk sizes.
---
tools/lvcreate.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/tools/lvcreate.c b/tools/lvcreate.c
index 4a1534c..448f125 100644
--- a/tools/lvcreate.c
+++ b/tools/lvcreate.c
@@ -396,13 +396,15 @@ static int _update_extents_params(struct volume_group *vg,
&lp->discards,
&lp->zero_new_blocks))
return_0;
- } else if (!update_cache_pool_params(vg->cmd, vg->profile, vg->extent_size,
- lp->segtype, lp->target_attr,
- lp->extents,
- &lp->pool_metadata_extents,
- &lp->thin_chunk_size_calc_policy,
- &lp->chunk_size))
- return_0;
+ } else if (segtype_is_cache_pool(lp->segtype) || segtype_is_cache(lp->segtype)) {
+ if (!update_cache_pool_params(vg->cmd, vg->profile, vg->extent_size,
+ lp->segtype, lp->target_attr,
+ lp->extents,
+ &lp->pool_metadata_extents,
+ &lp->thin_chunk_size_calc_policy,
+ &lp->chunk_size))
+ return_0;
+ }
if (lcp->percent == PERCENT_FREE || lcp->percent == PERCENT_PVS) {
if (lp->extents <= (2 * lp->pool_metadata_extents)) {
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7737ffb11ceba0f4220e1…
Commit: 7737ffb11ceba0f4220e1dfb79b8e97f20e7b8e9
Parent: dad2660a387ed32dc8146b497d279089c1ce48ed
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Jan 13 17:27:24 2020 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Jan 13 17:42:31 2020 +0100
raid: disallow reshape of stacked LVs
Until we resolve reshape for 'stacked' devices, we need to disable it.
So users can no longer reshape i.e. thin-pool data volumes, causing
ATM bad thin-pool problems.
---
lib/metadata/raid_manip.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index a1c51aa..4855039 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -6438,6 +6438,12 @@ int lv_raid_convert(struct logical_volume *lv,
uint32_t available_slvs, removed_slvs;
takeover_fn_t takeover_fn;
+ /* FIXME Can't reshape volume in use - aka not toplevel devices */
+ if (!dm_list_empty(&lv->segs_using_this_lv)) {
+ log_error("Can't reshape stacked volume %s.", display_lvname(lv));
+ return 0;
+ }
+
/* FIXME If not active, prompt and activate */
/* FIXME Some operations do not require the LV to be active */
/* LV must be active to perform raid conversion operations */
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c575c1c9ff71d95b6af0e…
Commit: c575c1c9ff71d95b6af0ec75798dd597491ca0b8
Parent: 36210c2b491424d7a0ab27d0a65effd6fc6ecc4c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Jan 6 15:57:08 2020 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Jan 13 17:41:22 2020 +0100
vdo: avoid running initialization of cache pool vars
Since VDO is also pool, the old if() case missed to know about this,
and executed unnecesserily initialization of cache pool variables.
This was usually harmless when using 'smaller' sizes of VDO pools,
but for big VDO pool size, we were reporting senseless messages
about big cache chunk sizes.
---
tools/lvcreate.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/tools/lvcreate.c b/tools/lvcreate.c
index c27b798..4be8e03 100644
--- a/tools/lvcreate.c
+++ b/tools/lvcreate.c
@@ -395,13 +395,15 @@ static int _update_extents_params(struct volume_group *vg,
&lp->discards,
&lp->zero_new_blocks))
return_0;
- } else if (!update_cache_pool_params(vg->cmd, vg->profile, vg->extent_size,
- lp->segtype, lp->target_attr,
- lp->extents,
- &lp->pool_metadata_extents,
- &lp->thin_chunk_size_calc_policy,
- &lp->chunk_size))
- return_0;
+ } else if (segtype_is_cache_pool(lp->segtype) || segtype_is_cache(lp->segtype)) {
+ if (!update_cache_pool_params(vg->cmd, vg->profile, vg->extent_size,
+ lp->segtype, lp->target_attr,
+ lp->extents,
+ &lp->pool_metadata_extents,
+ &lp->thin_chunk_size_calc_policy,
+ &lp->chunk_size))
+ return_0;
+ }
if (lcp->percent == PERCENT_FREE || lcp->percent == PERCENT_PVS) {
if (lp->extents <= (2 * lp->pool_metadata_extents)) {
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=36210c2b491424d7a0ab2…
Commit: 36210c2b491424d7a0ab27d0a65effd6fc6ecc4c
Parent: 50c56ade2a7a89f751091669fb8b31854f93eff1
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Jan 13 17:27:24 2020 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Jan 13 17:41:22 2020 +0100
raid: disallow reshape of stacked LVs
Until we resolve reshape for 'stacked' devices, we need to disable it.
So users can no longer reshape i.e. thin-pool data volumes, causing
ATM bad thin-pool problems.
---
lib/metadata/raid_manip.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 9030261..548faf1 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -6444,6 +6444,12 @@ int lv_raid_convert(struct logical_volume *lv,
uint32_t available_slvs, removed_slvs;
takeover_fn_t takeover_fn;
+ /* FIXME Can't reshape volume in use - aka not toplevel devices */
+ if (!dm_list_empty(&lv->segs_using_this_lv)) {
+ log_error("Can't reshape stacked volume %s.", display_lvname(lv));
+ return 0;
+ }
+
/* FIXME If not active, prompt and activate */
/* FIXME Some operations do not require the LV to be active */
/* LV must be active to perform raid conversion operations */