User Tools

no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


lvm2 [2023/11/07 15:30] (current) – created norman
Line 1: Line 1:
 +====== Delete or Remove LVM Volumes ======
  
 +Step 1: Delete entry from /etc/fstab
 +
 +<code>cat /etc/fstab
 +...
 +/dev/CVOL/workspace            /data              ext4    defaults        0 0
 +...</code>
 +
 +Step 2: unmount the partition
 +
 +<code>umount /data</code>
 +
 +Step 3: Disable LVM
 +
 +<code>lvchange -an /dev/CVOL/workspace</code>
 +
 +Step 4: Delete LVM volume
 +
 +<code>lvremove /dev/CVOL/workspace</code>
 +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
 +
 +<code>vgremove CVOL</code>
 +
 +Volume group "CVOL" successfully removed
 +
 +Step 6: Delete physical volumes used for volume group ā€œvgā€
 +
 +<code>pvremove /dev/sda4</code>
 +
 +Labels on physical volume "/dev/sda4" successfully wiped.
 +<code>
 +pvremove /dev/sdb</code>
 +
 +Labels on physical volume "/dev/sdb" successfully wiped.
 +
 +
 +Source: [[https://faun.pub/linux-quick-tip-how-to-delete-or-remove-lvm-volumes-7df4447102af|External Link]]