Re: recommendations on how to recover a corrupted, LVM-based hard drive?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/14/2014 08:52 AM, Robert P. J. Day wrote:
   so ... what now? i can see the detailed definition of the volume
group, and all of the logical volumes that were/are(?) still there,
and the only LV i care about is "home" which is the fifth one down in
the list of LVs, suggesting it's far enough down to have escaped the
overwriting unscathed.

   so what would be the proper recipe to simply reactivate that volume
group and single logical volume within that group? thanks.

You need to figure out just where that PV partition was located on
the disk.

In the physical_volumes section, look at the dev_size. How might
that have been placed on the disk? It was very likely a partition
that went to the end of the disk -- perhaps not the very end but
just the last full "cylinder" (at the most common geometry of 255
heads and 63 sectors per track). From that, calculate the starting
location for the partition. Keep playing until you get something
"reasonable", i.e., either a cylinder boundary or a megabyte
boundary (LBA a multiple of 8).

Now look at the start_extent for that fifth LV.  Multiply by the
extent size (it'a at the top, in the global parameters) and then
calculate its LBA based on the presumed starting LBA for the PV
partition. See if that corresponds to one of the partition
candidates found by testdisk.  If you can find a match, create the
PV partition, initialize it with pvcreate and the same UUID the PV
originally had, and then do a vgcfgrestore from the file you've been
using.

If this were a real recovery situation, you would of course be doing
all this from a copy of the drive, not the original. But you've said
elsewhere that this is an intellectual exercise and you have a
backup of the data, so there's no serious harm done if something
goes terribly wrong.

--
Bob Nichols     "NOSPAM" is really part of my email address.
                Do NOT delete it.

--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux