Re: Recovering a folder on an LVM ext3 partition



"Arno Wagner" <me@xxxxxxxxxxx> wrote in message news:4m536mF4gor0U2@xxxxxxxxxxxxxx
Previously microx <microx.topics@xxxxxxxxxxxxxxxx> wrote:
I just had a sudden break down of my hard disk running Linux, don't
know what the reason is, but the result is that all the partitions in an
LVM group are now seriously corrupt. The HD layout looks something
like this:

hda1 - primary Windows partition
hda2 - primary ext3 for /boot
hda3 - LVM containing 4 logical ext3 partitions: / (root), /home,
/usr/local, swap

It's strange that LVM itself reports no errors, but the logical
partitions are all screwed, while the 2 partitions not inside LVM are
untouched.

Anyone have a clue why that is?

Because of how LVM works, maybe?


Can you be a bit more specific what "screwed" means? Also:
What kernel version, what were you doing when the corruption occured?

Is it possible that yopu acctdentially overwrote parts of hda3?
The LVM descriptor block is at the end of the volume, so it would be
the last thing to go.

Anyway, obviously the partition I care most about is /home. I booted
from a LiveCD and I tried doing fsck on the root first as a trial, and
ended up with a working, but empty, partition. :-) So I proceeded with
more caution on the /home partition, I answered "no" to any questions
about "force rewrite", but I let it move things to lost+found. At the
end, I attempted to mount the partition, it worked, but one top-level
folder which was called "data" is gone. At one point during fsck, I
noticed it asking about clearing this folder's extra inodes or somthing
like that. This folder contained tons of photo files, as well as some
other media and documents. There are lots of files in the lost+found,
and some folders, so I assumed the "data" folder just might be one of
those folders, however corrupted. However, if I try to cd into any of
them, I just get thrown back to the home folder (the home of the
LiveCD, not the one I'm recovering). Is there any way I can try to
recover these folders?

Hmm. Since you worked on the original partitions without backup, there
is a good possibility that you destroyed additional data.
Also there will be only files in lost+found, not directories.

The behaviour you observe is correct

(depending on shell settings).

So actually may not be correct.....


Advice: Stop writing to the disk immediuately. Make a sector image anf
work on that. Then start looking for your files in lost+found. Other steps
depend on what caused the corruption, but stop writing on the original
immediately!

I am also curious what prompted the use of LVM for this setup.
Usually you would just do a conventional extended partition,

using LVM does not really make sense.

So when does making use of LVM make sense if "using LVM does not really make sense", babblebot.


Additional advice: It is Linux and pretty corruption resistent,

As the above example easily illustrates.

but backup is non-optional for important files, no matter what.

Arno
.



Relevant Pages

  • Re: Recovering a folder on an LVM ext3 partition
    ... an LVM group are now seriously corrupt. ... partitions are all screwed, while the 2 partitions not inside LVM are ... what were you doing when the corruption ... This folder contained tons of photo files, ...
    (comp.sys.ibm.pc.hardware.storage)
  • Re: Recovering a folder on an LVM ext3 partition
    ... it won't mount saying it ... and I've just been seeing the LVM option during the Fedora ... flexibility in resizing partitions if I needed. ... could try ext3 data recovery programs. ...
    (comp.sys.ibm.pc.hardware.storage)
  • Re: Booting - Enterprise Volume Management System
    ... Since the main LVM advantage is meant to be easy resizing, ... you could just as well use that space to copy or resize basic partitions. ... So you know better than the HOWTO that no recent kernels are affected. ... I don't claim you never have to unmount, but with LVM you have to unmount with ...
    (Ubuntu)
  • Re: Booting - Enterprise Volume Management System
    ... bother with LVM on a single disk if you can just make one big partition? ... Perhas you know better than the HOWTO: ... Mostly, filesystems will grow. ... You can grow and move partitions with parted anyway, so LVM has no advantage if ...
    (Ubuntu)
  • Re: New Disk File Problem
    ... This sounds like a file ownership issue related to NTFS. ... Open Explorer, go to Tools and Folder Options, on the view tab, scroll to ... I made>several partitions on this drive also with no problems an I can see them in>Windows Explorer. ...
    (microsoft.public.windowsxp.configuration_manage)