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/13/2014 09:26 AM, Robert P. J. Day wrote:
On Thu, 13 Feb 2014, Robert Nichols wrote:
In /etc/lvm/backup you should find a file describing that volume group.
It will show what partition each PV was on ("Hint only") and where the
extents for each LV were located. If you can figure out where the PV's
partition started and re-create that in the partition table, you can
then do a "vgcfgrestore" to rebuild the VG metadata. If your old home
LV was beyond the overwritten area, you should get it back.

If you don't find the VG in /etc/lvm/backup, try /etc/lvm/archive.

   keep in mind that the drive in question was never in operation on
this laptop, so that suggestion isn't going to work. but, would it be
feasible to simply copy the relevant LVM files from the original
system onto my laptop? would that effectively give me the same
information?

Sorry, I missed that detail, but yes, the LVM files, however you can
get them, will still be relevant. The references to specific /dev/sd??
devices would not apply directly, but they are identified as "Hint only"
in the files.

There are a couple of ways to approach this. If you can, by calculation,
determine the correct starting location for the partition that held the
PV, you would create that partition on the drive, initialize it as a PV
by running the "pvcreate" command and specifying the same UUID that is
listed as the PV ID in the LVM backup file, and then use "vgcfgrestore"
to reconstruct the LV metadata. vgcfgrestore will find the partition by
searching for that UUID, not by the "hint" in the file, but correcting
that hint to point to the right partition might speed things up.

Another approach applies of the list of extents in the LVM file shows
that the home LV was allocated with a single contiguous block of extents.
If that is the case, then you should be able to create a partition that
starts where that filesystem begins (testdisk should have identified
that as a candidate) and simply mount that partition. (If the LV was
_not_ one contiguous block, that isn't going to work.)

--
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