1.查看配置文件,默认情况下,自动扩展名设置为“ 100 ”
grep thin_pool_autoextend_threshold /etc/lvm/lvm.conf
#grep thin_pool_autoextend_threshold /etc/lvm/lvm.conf
#配置选项activation / thin_pool_autoextend_threshold。
#thin_pool_autoextend_threshold = 70
thin_pool_autoextend_threshold = 100
这些设置表明该功能已被禁用:
#配置选项activation / thin_pool_autoextend_threshold表明当精简池的使用率超过此百分比时,自动扩展。 #设置为100将禁用自动扩展。
2.启用自动扩展,请同时更改“ 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,依此类推。
3.重启 reboot