home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] recovering data from a Physical Volume!

On Sat, Dec 16, 2006 at 12:44:38AM +0900, Maximo Ramos wrote:
> I used to have an old LVM, like this:
> /dev/hdc1 and /dev/hdd1
> Now, /dev/hdc1 just died .... is there any chance to recover some of the
> data in the /dev/hdd1 ?

There's always a chance.  What format was the LVM partition?  EXT2/3?
You might be able to point fsck at the raw disk partition if you can
find a superblock in it somewhere.

I think things will be complicated by the fact that offsets in the
partition will expect that hdc1 precedes hdd1.  So you might only
be able to fsck hdd1 as part of a larger partition.  I can think of two
ways of doing that:

1)  Get two new disks/partitions that are the exact size of hdc1 and
    hdd1 and create a new, empty LVM on them, exactly like you did
    for the real hdc1 and hdd1.  Once the new LVM is created, shut it
    down and copy hdd1 on top of the second partition in the new LVM.
    Then run fsck on the LVM partition.

2)  Create a single partition (non-LVM) that is the size of your
    combined hdc1+hdd1 LVM partition.  Create a file system on it
    that is the exact size of the old LVM file system.  Shut it down.
    Copy hdd1 on top of the new file system, offset by the size of hdc1.
    Run fsck.  (The trick here will be making sure that the file system
    is layed out exactly like the old LVM was laid out, and then finding
    the exact place to copy hdd1.)

I would think that someone "out there" has tried one of these two things.
The trick will be finding the info.

-- 
| Ian! D. Allen  -  idallen [ at ] idallen [ dot ] ca  -  Ottawa, Ontario, Canada
| Home Page: http://www.idallen.com/ - Contact Improv: http://contactimprov.ca/
| College professor (Open Source / Linux) via: http://teaching.idallen.com/
| Support the public commons and public digital rights:  http://eff.org/