[Novalug] Restoring Logical Volumes

Peter Larsen plarsen@famlarsen.homelinux.com
Mon Nov 16 14:54:20 EST 2009


On Mon, 2009-11-16 at 13:45 -0500, Steve Green wrote:

> I was doing some disk maintenance over the weekend on two separate
> LVM2 disks containing Fedora Core 5. They both had the default volume
> group name (VolGroup00). I removed the logical groups (lvremove), then
> the volume group (vgremove). Of course I did this on the wrong disk
> and need to access the data on that physical disk.
> 
> I have no backup of the metadata. Is there a procedure or a tool that
> can rebuild the metadata and/or the volume by reading the physical
> disk? I believe the metadata is stored in multiple locations on the
> disk, but I would guess the vgremove command wipes out all of those
> copies. Or is it similar to the format command that simply marks the
> space 'available for use' and the data is actually still there?
> 
> Any thoughts on how I could recover the data? Appreciate any
> assistance. 


Steve,
I'm not sure what you mean by "did it on the wrong disk". A VG covers
one or more physical disks and you cannot have two VGs with the same
name mounted. However, you do have metadata backups - they're made
automatically for you. They're in /etc/lvm/backup. You should be able to
restore using vgcfgrestore using the backup file. Assuming you haven't
written anything else to the disk in the mean time.

-- 

Best Regards
  Peter Larsen

Wise words of the day:
People disagree with me.  I just ignore them.
	-- Linus Torvalds, regarding the use of C++ for the Linux kernel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.firemountain.net/pipermail/novalug/attachments/20091116/cf02ef29/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://lists.firemountain.net/pipermail/novalug/attachments/20091116/cf02ef29/attachment.asc>


More information about the Novalug mailing list