diff --git a/WHATS_NEW b/WHATS_NEW index 8a5012291..04906f028 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.103 - ====================================== + Add lvm.conf allocation/thin_pool_chunk_size_calculation option. Fix contiguous & cling allocation policies for parity RAID. (2.02.100) Set use_lvmetad=0 on lvmconf --enable-cluster, reset to default on --disable-cluster. Don't install separate command symlink in binary directory for 'lvm devtypes'. diff --git a/conf/example.conf.in b/conf/example.conf.in index 6adcecff9..f06b705ad 100644 --- a/conf/example.conf.in +++ b/conf/example.conf.in @@ -252,6 +252,21 @@ allocation { # be placed on different PVs from the pool data. thin_pool_metadata_require_separate_pvs = 0 + # Specify chunk size calculation method for thin pool volumes. + # Possible options are: + # "default" - if thin_pool_chunk_size is defined, use it. + # Otherwise, calcucate the chunk size based on + # estimation and device hints exposed in sysfs: + # the minimum_io_size. The chunk size is always + # at least 64KiB. + # + # "performance" - if thin_pool_chunk_size is defined, use it. + # Otherwise, calculate the chunk size for + # performance based on device hints exposed in + # sysfs: the optimal_io_size. The chunk size is + # always at least 512KiB. + # thin_pool_chunk_size_calculation = "default" + # Specify the minimal chunk size (in KB) for thin pool volumes. # Use of the larger chunk size may improve perfomance for plain # thin volumes, however using them for snapshot volumes is less efficient, diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h index 3549b6d51..8ea2c9291 100644 --- a/lib/config/config_settings.h +++ b/lib/config/config_settings.h @@ -107,8 +107,10 @@ cfg(allocation_mirror_logs_require_separate_pvs_CFG, "mirror_logs_require_separa cfg(allocation_thin_pool_metadata_require_separate_pvs_CFG, "thin_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_THIN_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 89), NULL) cfg(allocation_thin_pool_zero_CFG, "thin_pool_zero", allocation_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_THIN_POOL_ZERO, vsn(2, 2, 99), NULL) cfg(allocation_thin_pool_discards_CFG, "thin_pool_discards", allocation_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_THIN_POOL_DISCARDS, vsn(2, 2, 99), NULL) +cfg(allocation_thin_pool_chunk_size_calculation_CFG, "thin_pool_chunk_size_calculation", allocation_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_THIN_POOL_CHUNK_SIZE_CALCULATION, vsn(2, 2, 101), NULL) cfg(allocation_thin_pool_chunk_size_CFG, "thin_pool_chunk_size", allocation_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_INT, DEFAULT_THIN_POOL_CHUNK_SIZE, vsn(2, 2, 99), NULL) + cfg(log_verbose_CFG, "verbose", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_VERBOSE, vsn(1, 0, 0), NULL) cfg(log_silent_CFG, "silent", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_SILENT, vsn(2, 2, 98), NULL) cfg(log_syslog_CFG, "syslog", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_SYSLOG, vsn(1, 0, 0), NULL) diff --git a/lib/config/defaults.h b/lib/config/defaults.h index d200331c8..361d9274d 100644 --- a/lib/config/defaults.h +++ b/lib/config/defaults.h @@ -71,6 +71,7 @@ #define DEFAULT_THIN_POOL_MAX_METADATA_SIZE (16 * 1024 * 1024) /* KB */ #define DEFAULT_THIN_POOL_MIN_METADATA_SIZE 2048 /* KB */ #define DEFAULT_THIN_POOL_OPTIMAL_SIZE (128 * 1024 * 1024) /* KB */ +#define DEFAULT_THIN_POOL_CHUNK_SIZE_CALCULATION "default" #define DEFAULT_THIN_POOL_CHUNK_SIZE 64 /* KB */ #define DEFAULT_THIN_POOL_DISCARDS "passdown" #define DEFAULT_THIN_POOL_ZERO 1