
This assumes you are familiar with LVM (Logical Volume Manager). If not, check out my article Getting Started with LVM (Logical Volume Manager).
The lvremove command can be used to remove an LVM logical volume. Before removing a logical volume, use the mount command to determine if the logical volume is mounted. In this example, the /dev/mapper/var logical volume is mounted to /var.
~]# mount
/dev/mapper/var on /var type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
If the logical volume is mounted, use the umount command to unmount the logical volume.
umount /dev/mapper/var
Then use the lvremove command to remove the logical volume.
lvremove /dev/vg001/var
You will be prompted "are you sure". Enter y to remove the logical volume.
Do you really want to remove active logical volume vg001/var? [y/n]: y
Or you can avoid the prompt like this.
echo y | lvremove /dev/mapper/var
If the logical volume is successfully removed, something like this should be returned.
Logical volume "var" successfully removed
Did you find this article helpful?
If so, consider buying me a coffee over at