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