Home > Geeky stuff > Getting ride of volumen group that doesn't exsist in linux

Getting ride of volumen group that doesn't exsist in linux

I was setting up a test VM with 4 one TB SAN LUNS.  After successfully creating and testing the VMware image I blew it away without touching the LVM. After greating the production image I tried to add the LUNS back to the LVM and I of course got errors when adding the LUNS to the LVM.  The meta data for the old volume group was still there and the OS refused to add the LUNS to the existing volume group.  I then tried to remove the volume group with the vgremove but since the devices with the UUIDs themselfs were long gone I could not do it.

I finally found a very simple solution just DD the damn things with zeros.  That will blow out all the metadata. So for each lun I ran

if=/dev/zero of=/dev/XXX bs=512 count=5

Probably only needed a count=1 but what the hell I don’t care I didn’t have anydata on the LUNS anyways.  After that  running lvscan came back clean with no orphaned UUID’s and I was able to initialize the LUNS again and add them to the new volume group.

Advertisements
Categories: Geeky stuff
  1. No comments yet.
  1. No trackbacks yet.

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

%d bloggers like this: