User Tools

Site Tools


lvm2

Delete or Remove LVM Volumes

Step 1: Delete entry from /etc/fstab

cat /etc/fstab
...
/dev/CVOL/workspace            /data              ext4    defaults        0 0
...

Step 2: unmount the partition

umount /data

Step 3: Disable LVM

lvchange -an /dev/CVOL/workspace

Step 4: Delete LVM volume

lvremove /dev/CVOL/workspace
Do you really want to remove and DISCARD logical volume CVOL/workspace? [y/n]: y Logical volume “workspace” successfully removed

Step 5: Disable volume group

vgremove CVOL

Volume group “CVOL” successfully removed

Step 6: Delete physical volumes used for volume group “vg”

pvremove /dev/sda4

Labels on physical volume “/dev/sda4” successfully wiped.

pvremove /dev/sdb

Labels on physical volume “/dev/sdb” successfully wiped.

Source: External Link

lvm2.txt · Last modified: 2023/11/07 15:30 by norman