Deleting an LVM partition


Following are the steps to delete an LVM partition:

1. Unmount LVM partition
2. Disable the LVM partition
3. Delete the LVM partition
4. Disable the Volume Group
5. Delete the Volume Group
6. Delete the physical Volume

So, let’s start:

Unmount LVM partition:
[root@nagios soj]# umount /dev/exampleVG/exampleLV

Disable LVM partition:
[root@nagios soj]# lvchange -an /dev/exampleVG/exampleLV

Delete LVM volume:
[root@nagios soj]# lvmremove /dev/exampleVG/exampleLV

Disable Volume Group
[root@nagios soj]# vgchange -an exampleVG

Delete the Volume Group
[root@nagios soj]# vgremove exampleVG

Delete the Physical Volume
[root@nagios soj]# pvremove /dev/sdc1 /dev/sdc2

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s