Red Hat Training
A Red Hat training course is available for Red Hat Enterprise Linux
30.4.3. 删除 VDO 卷
可以通过运行以下命令将 VDO 卷从系统中移除:
#
vdo remove --name=my_vdo
在删除 VDO 卷前,请卸载文件系统并停止使用存储的应用程序。The vdo remove 命令删除 VDO 卷及其关联的 UDS 索引,以及它们所在的逻辑卷。
30.4.3.1. 删除非成功创建卷
如果在
vdo
工具创建 VDO 卷时发生故障,则该卷会处于中间状态。当系统崩溃、电源失败或管理员中断 run vdo create 命令时,可能会发生这种情况。
要根据这种情况进行清理,请使用
--force
选项删除创建失败的卷:
#
vdo remove --force --name=my_vdo
需要
--force
选项,因为管理员可能会通过更改系统配置造成冲突,因为卷创建失败。如果没有 --force
选项,vdo remove 命令会失败并显示以下信息:
[...] A previous operation failed. Recovery from the failure either failed or was interrupted. Add '--force' to 'remove' to perform the following cleanup. Steps to clean up VDO my_vdo: umount -f /dev/mapper/my_vdo udevadm settle dmsetup remove my_vdo vdo: ERROR - VDO volume my_vdo previous operation (create) is incomplete