Remove LVM metadata without killing the patient

Derek Broughton news at pointerstop.ca
Sun Sep 28 02:58:16 UTC 2008


Brian McKee wrote:

> I have a working Hardy Heron box that *was* running LVM but when I
> restored from backup I changed to regular partitions and UUID.
> (Long story - I can relate why if you're really interested)

ooh, please!!!  It's time for a bedtime story 

(OK, just kidding - I _know_ the story, and I'm still not sure why I'm using
LVM...)
> 
> It seemed like I had it all working correctly, but a couple of days
> later I noticed  an odd failed message on bootup.
> After a bit of poking around I realized the LVM info still shows up if
> you do a pvdisplay or vgdisplay etc.
> even though the LVM partitions aren't actually there anymore.  I
> surmise that LVM metadata must be tucked away somewhere on the disk
> that it would survive formatting?

/etc/lvm/*

> 
> ==> sudo vgscan
>  Reading all physical volumes.  This may take a while...
>  Found volume group "VOLUME-GROUP-1" using metadata type lvm2

Well, that sort-of makes sense.  The volume-group itself is just a
collection of volumes - of which you no longer have any.
 
> How can I remove that LVM metadata without mucking up the regular,
> working, in use, disk partitons ?

I just took a very brief glance /etc/lvm/lvm.conf - long enough to see dire
warning :-)  I suspect just removing the lvm package(s) will do the job,
but I'd only do that on _your_ system :-)
-- 
derek





More information about the ubuntu-users mailing list