How to delete LVM volumes
This article explains the detailed steps to remove LVM volumes. Please take the necessary backups and give extra care on the commands as the deleted data will not be recoverable.
Step1: Login to the server via ssh as root.
Step2: Open the fstab configuration.
#vi /etc/fstab
Step3: Remove the corresponding entry if any and save the file.
Step4: Unmount the partition.
#umount <MNT-PT>
Here MNT-PT need to be replaced with the corresponding mount point where the lvm mounted.
Step5: Disable the logical volume.
#lvchange -an <LVM-NAME>
Here LVM-NAME need to be replaced with the corresponding LVM name.
Step6: Delete the logical volume.
#lvremove <LVM-NAME>
Here LVM-NAME need to be replaced with the corresponding LVM name.
Step7: Delete the volume group.
#vgremove <VG-NAME>
Here VG-NAME need to be replaced with the corresponding Volume group name.
Step8: Delete the physical volume.
#pvremove <PV-NAME>
Here VG-NAME need to be replaced with the corresponding Volume group name.
That's all…