Deleting an LVM partition

Following are the steps to delete an LVM partition:

1. Unmount LVM partition
2. Disable the LVM partition
3. Delete the LVM partition
4. Disable the Volume Group
5. Delete the Volume Group
6. Delete the physical Volume

So, let’s start:

Unmount LVM partition:
[root@nagios soj]# umount /dev/exampleVG/exampleLV

Disable LVM partition:
[root@nagios soj]# lvchange -an /dev/exampleVG/exampleLV

Delete LVM volume:
[root@nagios soj]# lvmremove /dev/exampleVG/exampleLV

Disable Volume Group
[root@nagios soj]# vgchange -an exampleVG

Delete the Volume Group
[root@nagios soj]# vgremove exampleVG

Delete the Physical Volume
[root@nagios soj]# pvremove /dev/sdc1 /dev/sdc2