mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
thin: warn about too big chunks size
lvm2 warned about zeroing and too big chunksize (>=512KiB), but only during lvconvert, so lvcreate was creating thin-pools without any warning about possible slowness of thin provisioning because of zeroing.
This commit is contained in:
parent
3654f478e1
commit
8256170e6a
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.174 -
|
Version 2.02.174 -
|
||||||
=================================
|
=================================
|
||||||
|
Add warning when creating thin-pool with zeroing and chunk size >= 512KiB.
|
||||||
Introduce exit code 4 EINIT_FAILED to replace -1 when initialisation fails.
|
Introduce exit code 4 EINIT_FAILED to replace -1 when initialisation fails.
|
||||||
Add synchronization points with udev during reshape of raid LVs.
|
Add synchronization points with udev during reshape of raid LVs.
|
||||||
|
|
||||||
|
@ -752,8 +752,19 @@ int update_thin_pool_params(struct cmd_context *cmd,
|
|||||||
!set_pool_discards(discards, DEFAULT_THIN_POOL_DISCARDS))
|
!set_pool_discards(discards, DEFAULT_THIN_POOL_DISCARDS))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
if (*zero_new_blocks == THIN_ZERO_UNSELECTED)
|
if (*zero_new_blocks == THIN_ZERO_UNSELECTED) {
|
||||||
*zero_new_blocks = (DEFAULT_THIN_POOL_ZERO) ? THIN_ZERO_YES : THIN_ZERO_NO;
|
*zero_new_blocks = (DEFAULT_THIN_POOL_ZERO) ? THIN_ZERO_YES : THIN_ZERO_NO;
|
||||||
|
log_verbose("%s pool zeroing on default.", (*zero_new_blocks == THIN_ZERO_YES) ?
|
||||||
|
"Enabling" : "Disabling");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((*zero_new_blocks == THIN_ZERO_YES) &&
|
||||||
|
(*chunk_size >= DEFAULT_THIN_POOL_CHUNK_SIZE_PERFORMANCE * 2)) {
|
||||||
|
log_warn("WARNING: Pool zeroing and %s large chunk size slows down thin provisioning.",
|
||||||
|
display_size(cmd, *chunk_size));
|
||||||
|
log_warn("WARNING: Consider disabling zeroing (-Zn) or using smaller chunk size (<%s).",
|
||||||
|
display_size(cmd, DEFAULT_THIN_POOL_CHUNK_SIZE_PERFORMANCE * 2));
|
||||||
|
}
|
||||||
|
|
||||||
log_verbose("Preferred pool metadata size %s.",
|
log_verbose("Preferred pool metadata size %s.",
|
||||||
display_size(cmd, (uint64_t)*pool_metadata_extents * extent_size));
|
display_size(cmd, (uint64_t)*pool_metadata_extents * extent_size));
|
||||||
|
@ -3088,11 +3088,6 @@ static int _lvconvert_to_pool(struct cmd_context *cmd,
|
|||||||
if (!vg_write(vg) || !vg_commit(vg))
|
if (!vg_write(vg) || !vg_commit(vg))
|
||||||
goto_bad;
|
goto_bad;
|
||||||
|
|
||||||
if ((seg->zero_new_blocks == THIN_ZERO_YES) &&
|
|
||||||
seg->chunk_size >= DEFAULT_THIN_POOL_CHUNK_SIZE_PERFORMANCE * 2)
|
|
||||||
log_warn("WARNING: Pool zeroing and large %s chunk size slows down provisioning.",
|
|
||||||
display_size(cmd, seg->chunk_size));
|
|
||||||
|
|
||||||
if (activate_pool && !lockd_lv(cmd, pool_lv, "ex", LDLV_PERSISTENT)) {
|
if (activate_pool && !lockd_lv(cmd, pool_lv, "ex", LDLV_PERSISTENT)) {
|
||||||
log_error("Failed to lock pool LV %s.", display_lvname(pool_lv));
|
log_error("Failed to lock pool LV %s.", display_lvname(pool_lv));
|
||||||
goto out;
|
goto out;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user