Remove LVM metadata without killing the patient

Brian McKee brian.mckee at gmail.com
Sun Sep 28 01:25:41 UTC 2008


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)

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?

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

lvscan and pvscan show the historical info too... but

==> sudo fdisk -l

Disk /dev/sda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xbfc1bfc1

  Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1           9       72261   83  Linux
/dev/sda2   *          10          41      257040   83  Linux
/dev/sda3              42        4865    38748780    5  Extended
/dev/sda5              42         172     1052226   82  Linux swap / Solaris
/dev/sda6             173        2721    20474811   83  Linux
/dev/sda7            2722        4865    17221648+  83  Linux


Look Ma - no LVM!

How can I remove that LVM metadata without mucking up the regular,
working, in use, disk partitons ?

Comments appreciated,

Brian




More information about the ubuntu-users mailing list