默认情况下,自动扩展(automatic extension)设置为“100”
# grep thin_pool_autoextend_threshold /etc/lvm/lvm.conf # Configuration option activation/thin_pool_autoextend_threshold. # thin_pool_autoextend_threshold = 70 thin_pool_autoextend_threshold = 100
这些设置意味着该功能已被禁用。
从 /etc/lvm/lvm.conf 配置文件:
# 'thin_pool_autoextend_threshold' and 'thin_pool_autoextend_percent' define # how to handle automatic pool extension. The former defines when the # pool should be extended: when its space usage exceeds this many # percent. The latter defines how much extra space should be allocated for # the pool, in percent of its current size. # # For example, if you set thin_pool_autoextend_threshold to 70 and # thin_pool_autoextend_percent to 20, whenever a pool exceeds 70% usage, # it will be extended by another 20%. For a 1G pool, using up 700M will # trigger a resize to 1.2G. When the usage exceeds 840M, the pool will # be extended to 1.44G, and so on. # # Setting thin_pool_autoextend_threshold to 100 disables automatic # extensions. The minimum value is 50 (A setting below 50 will be treated # as 50). 'thin_pool_autoextend_threshold' 和 'thin_pool_autoextend_percent' 定义了如何处理自动池扩展。 前者定义了何时应该扩展池:当它的空间使用量超过这个百分比时。 后者定义了应该为池分配多少另外空间,以其当前大小的百分比表示。 例如,如果将thin_pool_autoextend_threshold 设置为70,将thin_pool_autoextend_percent 设置为20,则每当池使用率超过70% 时,它将再扩展20%。 对于 1G 池,使用 700M 将触发调整为 1.2G。 当使用量超过840M时,池将扩展到1.44G,以此类推。 将thin_pool_autoextend_threshold 设置为100 会禁用自动扩展。 最小值为 50(低于 50 的设置将被视为 50)。
要启用自动扩展,请同时更改 'thin_pool_autoextend_percent ' 和 'thin_pool_autoextend_threshold ' 设置:
thin_pool_autoextend_threshold = 70 thin_pool_autoextend_percent = 20
日期:2020-09-17 00:13:36 来源:oir作者:oir