How to delete a volume group in LVM
The post describes steps to delete a volume group. Make sure you have unmounted and the mount points and taken prior backup of the mount point if required.
- Once you have umounted all the mount points, you can remove the LVs associated with them. To do so use the lvremove command :
$ lvremove -f [vg_name]/[lv_name]
- To remove the Volume group we have to deactivate it first with vgchange command :
$ vgchange -an [vg_name]
- You can remove the VG now.
$ vgremove [vg_name]
- To remove physical volumes in the VG use following command:
$ pvremove [pv_name]