1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

thin: Improve overprovisioning and repair warnings.

This commit is contained in:
Alasdair G Kergon 2017-10-09 19:48:00 +01:00
parent 3a639d8144
commit 22789563de
3 changed files with 12 additions and 7 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.176 -
===================================
Improve thin pool overprovisioning and repair warning messages.
Version 2.02.175 - 6th October 2017
===================================

View File

@ -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;

View File

@ -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;
}