Linux Practicum: Removing an LVM Configuration on CentOS 7
Following our practicum example to create an LVM volume with XFS on CentOS 7, we will now see how to remove it.
First we need to edit /etc/fstab to remove the entry that we put there. This is generally easiest if done manually.
# umount /var/log2 # lvremove vg_logs/lv_logs Do you really want to remove active logical volume lv_logs? [y/n]: y Logical volume "lv_logs" successfully removed # vgremove vg_logs Volume group "vg_logs" successfully removed # pvremove /dev/vdb Labels on physical volume "/dev/vdb" successfully wiped # pvs PV VG Fmt Attr PSize PFree /dev/vda2 centos_lab-lnx-centos lvm2 a-- 14.41g 40.00m
Quick and easy.
Part of a series on Linux Systems Administration by Scott Alan Miller