-   Linux - Hardware (
-   -   LVM disappear (

Nemesiz 08-15-2010 03:14 AM

LVM disappear
I had to move data from one HDD to another. So in existing LVM I extended it with new HDD. Moved from one to another hdd. Was fine but after restart LVM disappeared. I can see only partition LVM (pvdisplay, lvdisplay, vgdisplay show empty). No lucky recovering it. So can i use pvcreate (i don't have a backup data or uuid) and somehow get logical volumes with data?

I tried with testdisk and others with no good lucky.

rayfordj 08-15-2010 07:39 AM

Depending on the distro you may find LVM metadata backup(s) under /etc/lvm/, otherwise, you should be able to pull it off the disk(s) using dd. See Recovery PV Meta-Data for an example.

Nemesiz 08-15-2010 12:31 PM

The problem is that root partition is inside LVM. I am trying to recover using live cd.

Nemesiz 08-16-2010 04:16 PM

I found something


# This file is automatically maintained by lvm.

persistent_filter_cache {

So UUID are :

3 logical volumes was inside LVM group

Can someone give more glue ?

rayfordj 08-16-2010 05:38 PM

If they are discovered and available in the LVM .cache, I would imagine they would be visible in the output of pvs; vgs; lvs, no?

If you need to manually pull the LVM2 metadata from the PV(s) in the VG(s) you should be able to use something along the lines of:

# dd if=/dev/myPVpart of=/tmp/LVM2.dd bs=512 count=48
Where /dev/myPVpart is the physical-volume of the volume-group. It could be /dev/sda2, sdb1, sdc, ..., ...

Then you could use less or strings (or similar) to grab the LVM2 metadata text from it and identify how the LVs were structured. If you are not able to bring the LV(s) up (activate) using the available LVM binaries, with the metadata you should be able to manually reassemble the LV(s) using device-mapper (dmsetup) directly to recover any data not yet overwritten as long as all the segments are available.

bjrnfrdnnd 03-24-2013 08:53 PM

lvm vg disappeared

I have read this thread and saw that rayfordj had some interesting insight into lvm recovery.
I have a similar problem ( and would like to know if anyone can tell me if and how I could use dmsetup in order to recover data?

haertig 03-24-2013 11:27 PM

Did you try running "vgchange -ay" ?

[edit] Oh, nevermind. I did not notice that this silly thread was TWO YEARS OLD before someone resurrected it with a necropost, and then I posted after that without checking. Sorry about that! [/edit]

rayfordj 03-25-2013 09:52 AM

@bjrnfrdnnd, see if these may not be useful to your particular situation...

Mount logical volume without a working volume group (<-- has a working dmsetup example, but you'll need to ensure your math is accurate for sector-size, extent-size, offset/starting-location, etc. for your particular configuration)

Disaster with LVM (includes reference to:

Hopefully, this'll get you on your way.

All times are GMT -5. The time now is 06:01 AM.