diff options
author | Alasdair G Kergon <agk@redhat.com> | 2017-10-09 19:48:00 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2017-10-09 19:48:00 +0100 |
commit | 22789563dec6d470a48e728305e6e0a92ff92a9f (patch) | |
tree | 2d6db12e47ae4bc73f7fe72ad29b36adc888ba61 | |
parent | 3a639d81445a00974c5ccfd877a197adf5607b22 (diff) | |
download | lvm2-22789563dec6d470a48e728305e6e0a92ff92a9f.tar.gz |
thin: Improve overprovisioning and repair warnings.
-rw-r--r-- | WHATS_NEW | 1 | ||||
-rw-r--r-- | lib/metadata/thin_manip.c | 9 | ||||
-rw-r--r-- | tools/lvconvert.c | 9 |
3 files changed, 12 insertions, 7 deletions
@@ -1,5 +1,6 @@ Version 2.02.176 - =================================== + Improve thin pool overprovisioning and repair warning messages. Version 2.02.175 - 6th October 2017 =================================== diff --git a/lib/metadata/thin_manip.c b/lib/metadata/thin_manip.c index bd2d2c3b7..3dfbcc11f 100644 --- a/lib/metadata/thin_manip.c +++ b/lib/metadata/thin_manip.c @@ -365,16 +365,19 @@ int pool_check_overprovisioning(const struct logical_volume *lv) if (sz != UINT64_C(~0)) { log_warn("WARNING: Sum of all thin volume sizes (%s) exceeds the " - "size of thin pool%s%s%s (%s)!", + "size of thin pool%s%s%s (%s).", display_size(cmd, thinsum), more_pools ? "" : " ", more_pools ? "s" : display_lvname(pool_lv), txt, (sz > 0) ? display_size(cmd, sz) : "no free space in volume group"); + if (max_threshold > 99 || !min_percent) + log_print_unless_silent("WARNING: You have not turned on protection against thin pools running out of space."); if (max_threshold > 99) - log_print_unless_silent("For thin pool auto extension activation/thin_pool_autoextend_threshold should be below 100."); + log_print_unless_silent("WARNING: Set activation/thin_pool_autoextend_threshold below 100 to trigger automatic extension of thin pools before they get full."); if (!min_percent) - log_print_unless_silent("For thin pool auto extension activation/thin_pool_autoextend_percent should be above 0."); + log_print_unless_silent("WARNING: Set activation/thin_pool_autoextend_percent above 0 to specify by how much to extend thin pools reaching the threshold."); + /* FIXME Also warn if there isn't sufficient free space for one pool extension to occur? */ } return 1; diff --git a/tools/lvconvert.c b/tools/lvconvert.c index 77d917402..28909dd3e 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -2272,7 +2272,7 @@ static int _lvconvert_thin_pool_repair(struct cmd_context *cmd, argv[++args] = NULL; if (pool_is_active(pool_lv)) { - log_error("Only inactive pool can be repaired."); + log_error("Active pools cannot be repaired. Use lvchange -an first."); return 0; } @@ -2377,11 +2377,12 @@ deactivate_pmslv: if (!vg_write(pool_lv->vg) || !vg_commit(pool_lv->vg)) return_0; - log_warn("WARNING: If everything works, remove %s volume.", + log_warn("WARNING: LV %s holds a backup of the unrepaired metadata. Use lvremove when no longer required.", display_lvname(mlv)); - log_warn("WARNING: Use pvmove command to move %s on the best fitting PV.", - display_lvname(first_seg(pool_lv)->metadata_lv)); + if (dm_list_size(&pool_lv->vg->pvs) > 1) + log_warn("WARNING: New metadata LV %s might use different PVs. Move it with pvmove if required.", + display_lvname(first_seg(pool_lv)->metadata_lv)); return 1; } |