Created
November 9, 2017 18:23
-
-
Save wesinator/860e6696e616e8d22b5f043b255b5f55 to your computer and use it in GitHub Desktop.
Steps to remove a logical volume (LVM)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# These steps worked when deleting a Fedora logical volume (lvm) partition on a UEFI system. | |
# They were run from a Fedora live session, and will probably work in Ubuntu based distros as well. | |
# Trying to delete an lvm / pv partition in Gparted will give you an error. | |
# To solve this, run the following: | |
lvs # lvscan to list logical volumes / volume group(s). | |
# If error about swap volume, run swapoff -a | |
# Replace vgname with the group name | |
vgchange -an vgname # deactivate volumes | |
lvremove vgname | |
vgremove -v vgname | |
pvremove /dev/sdX # remove the physical volume (partition remains and needs to be deleted by Gparted) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment