4.3.3.2. 自动扩展精简池
您可以通过启用监控,并设置 thin_pool_autoextend_threshold 和 thin_pool_autoextend_percent 配置参数来自动化精简池的扩展。
先决条件
- 管理访问权限.
流程
检查精简池是否已被监控:
# lvs -o lv_name,vg_name,seg_monitorLV VG Monitor ThinPoolName VolumeGroupName not monitored使用
dmeventd守护进程启用精简池监控:# lvchange --monitor y VolumeGroupName/ThinPoolName将 VolumeGroupName 替换为卷组的名称。将 ThinPoolName 替换为精简池的名称。
-
在您选择的编辑器中打开
/etc/lvm/lvm.conf文件。 取消
thin_pool_autoextend_threshold和thin_pool_autoextend_percent行的注释,并将每个参数设置为所需的值:thin_pool_autoextend_threshold = 70 thin_pool_autoextend_percent = 20thin_pool_autoextend_threshold决定 LVM 开始自动扩展精简池的百分比。例如,将其设置为 70 表示 LVM 会在达到 70% 容量时尝试扩展精简池。thin_pool_autoextend_percent指定达到阈值时精简池应扩展的百分比。例如,将其设置为 20 表示精简池将增加其当前大小的 20%。- 保存更改并退出编辑器。
重启
lvm2-monitor:# systemctl restart lvm2-monitor