[linux-lvm] deleted LV recovery: understanding metadata format and determining LV extents

Alasdair G Kergon agk at redhat.com
Sun Jan 11 17:33:36 UTC 2015


On Sat, Jan 10, 2015 at 06:12:03PM +0000, Thanos Makatos wrote:
> Hi, I'm working on a case where a bunch of logical volumes were deleted but now we need them back. We have disabled archives and back ups in lvm.conf. They way I am trying to approach the problem is to examine LVM's metadata (the first MB of the block device) and determine whether the extents used by these logical volumes have been assigned to other logical volumes.
 
So start by looking at the contents of the metadata areas and see if they still
contain backups you can extract.
They are circular buffers so look for the seqno field which is incremented
each time the metadata is changed.

lvmdump -m can grab the metadata.
'pvck -v $device' contains the beginnings of code to extract the backups

Alasdair




More information about the linux-lvm mailing list