5.4.12. 删除逻辑卷
To remove an inactive logical volume, use the
lvremove command. If the logical volume is currently mounted, unmount the volume before removing it. In addition, in a clustered environment you must deactivate a logical volume before it can be removed.
The following command removes the logical volume
/dev/testvg/testlv from the volume group testvg. Note that in this case the logical volume has not been deactivated.
lvremove /dev/testvg/testlv
# lvremove /dev/testvg/testlv
Do you really want to remove active logical volume "testlv"? [y/n]: y
Logical volume "testlv" successfully removed
您可以使用
lvchange -an 命令在删除逻辑卷之前明确将其失活,这样就不会出现询问您是否删除某个激活逻辑卷的提示。