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

murph murph at member.fsf.org
Wed Feb 12 16:56:42 UTC 2014


Try the poorly-named "testdisk" to see if it can get any of the old
partition information.  I've had good luck with recovering
accidentally-partitioned disks.

On Wed, Feb 12, 2014 at 11:39 AM, Robert P. J. Day
<rpjday at crashcourse.ca> wrote:
>
>   a friend asks me if there's a way to solve the following, not out of
> any sense of urgency (since there are backups) but more out of a sense
> of curiosity as to whether it can even be done.
>
>   long story short, a 750G drive which *used* to be the primary drive
> in a laptop was replaced with a newer drive, and the older drive was
> reassigned to be the secondary drive, /dev/sdb. in order to
> occasionally copy stuff from the old home directory, this entry was
> added to /etc/fstab on the new system:
>
>   /dev/vg1/home /opt/home     ext4    defaults        1 2
>
> so that (obviously) what used to be the "home" logical volume in the
> old "vg1" volume group appeared under /opt/home, and was available for
> the occasional restoration of old content.
>
>   problem: person was trying to write a 2G bootable (embedded Linux)
> image to an inserted USB drive and, rather than writing to /dev/sdc
> (the USB drive), "dd"ed to /dev/sdb instead, overwriting the first 2G
> of the secondary hard drive and, with it, whatever LSM content resided
> in that first 2G.
>
>   i have the drive connected to my fedora 20 laptop as /dev/sdb and,
> sure enough:
>
> $ sudo fdisk -l /dev/sdb
>
> Disk /dev/sdb: 698.7 GiB, 750156374016 bytes, 1465149168 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 4096 bytes
> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
> Disklabel type: dos
> Disk identifier: 0x00000000
>
> Device    Boot     Start       End  Blocks  Id System
> /dev/sdb1 *         2048    198655   98304   e W95 FAT16 (LBA)
> /dev/sdb2         198656   3481599 1641472  83 Linux
> $
>
>   so while the physical disk correctly shows up as almost 700G, the
> partition table has been replaced by the one from the embedded image,
> rendering the rest of the hard drive inaccessible.
>
>   is there any utility that will scan the drive beyond what is
> referenced by the partition table and try to identify valid logical
> volumes? i don't know anything offhand, so i'm open to suggestions.
> thanks.
>
> rday
>
> --
>
> ========================================================================
> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                         http://crashcourse.ca
>
> Twitter:                                       http://twitter.com/rpjday
> LinkedIn:                               http://ca.linkedin.com/in/rpjday
> ========================================================================
> --
> users mailing list
> users at lists.fedoraproject.org
> 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



-- 
Team Amiga  New Jersey - The less that I speak, the smarter I sound.


More information about the users mailing list