如何启用 Thin LVM 自动扩展

问题

如何为 LVM Thin卷启用自动扩展功能?

更多: zhilu jiaocheng

解决方法

默认情况下,自动扩展设置为“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

这些设置意味着该功能已被禁用:

# Configuration option activation/thin_pool_autoextend_threshold.
# Auto-extend a thin pool when its usage exceeds this percent.
# Setting this to 100 disables automatic extension.

要启用自动扩展,请同时更改 'thin_pool_autoextend_percent ' 和 'thin_pool_autoextend_threshold ' 设置:

thin_pool_autoextend_threshold = 70
thin_pool_autoextend_percent   = 20

这意味着每当池使用率超过 70% 时,它将再扩展 20%。
对于 1G 池,使用 700M 将触发调整为 1.2G。
当使用量超过840M时,池将扩展到1.44G,以此类推。

日期:2020-09-17 00:13:36 来源:oir作者:oir