[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-lvm
Subject:    Re: [linux-lvm] Repair inconsistent PV
From:       Andreas Pakulat <ap125 () informatik ! uni-rostock ! de>
Date:       2003-08-18 23:05:54
[Download RAW message or body]

On 18.Aug 2003 - 18:08:05, Scott Mcdermott wrote:
> Andreas Pakulat on Mon 18/08 23:42 +0200:
> > only wanted to notify everyone, that I could now solve my
> > problem with hexedit and lvm.h. I changed the Major/Minor
> > Numbers in both hdXX and then looked at the VG Data, I
> > found that the one in hdc2 seemed OK, while the one in
> > hda7 looked like random Data was written in it. So I
> > copied the VG Metadata into hda7 using dd. A vgscan marked
> > lvtmp as problematic, it was in hda7 but in the vgmetadata
> > were only 3 LV's, so I changed that and threw out the LV
> > Metadata of that particular lv. It is also the one I was
> > deleting when the hardware error occured. Now I can read
> > my data again.
> 
> that's cool investigative work...

With a bit knowledge of C and the size of integer-datatypes it is not
that hard. Even though I had to play a little, to find out which
metadata block is the right one. And the lvm.h file is very well written
and documented, it's relatively easy to use it to understand the bytes
on the device.

> just wondering out of curiosity...did you have a backup when
> you did this? :)

You mean a backup of my original VG-Metadata? No, I explained that in
the original post, I lost my / partition and wanted to reinstall my
system, during the reorganization of the VG I lost some metadata due to
a hardware error. If I had a backup of the LVM-Metadata the whole
process would have been much easier - only a pvcreate -ff and
vgcfgrestore. 

From the raw devices I made a backup before starting of doing anything
to the PV's, I did not want to loose more data.

And I did not have a system backup, as this system is not that
important, but it would have costed a reasonable amount of time to get
the system back working without the data from the lv.

Andreas

_______________________________________________
linux-lvm mailing list
linux-lvm@sistina.com
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic