All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@clusterfs.com>
To: Ralf Zerres <rzerres@networkx.de>
Cc: linux-lvm@sistina.com
Subject: Re: [linux-lvm] Desater Recovery <urgent>
Date: Mon Apr 22 12:25:02 2002	[thread overview]
Message-ID: <20020422172436.GE3017@turbolinux.com> (raw)
In-Reply-To: <002401c1ea10$873d91a0$6b01a8c0@PC07>

On Apr 22, 2002  17:15 +0200, Ralf Zerres wrote:
> on a production system we do have a serious data destruction problem. 
> Any help leading us to restore the filesystem will be honored. We can dicuss
> financial details later. First I'd like to describe the situation giving you
> a picture wether it is possible to restore the data. 
> Please answer as soon as possible to give me a hint wether I should wait for
> a detailed analysis, if it make sense to dig deeper or if it is more likely
> that people have to reinsert the data from printed information.
> 
> 0. PROBLEM:
> =========
> Destructed Filesystem after resizing LVG running a Postgres Database. 
> 
> ###
> # There is no actual backup, which is the mad point!!!! 
> ### 

Yes, very mad indeed.  I don't know why people persist in not having
backups, especially for production systems...

> I. Environment
> ===========
> 
> System:    Dual Prozessor PIII (2 CPU's 1Mhz)
> OS:    Linux 2.4.9 
> 
> Harddisk:    SCSI-3 (as Raid-5)
> Controller:    GDT 
> LVM version:     1.0.1-rc2(30/08/2001)
> 
> Kernel sees one harddrive (/dev/scsi/host2/bus0/target0)
> 
> Root is on standard ext3 fs (partition 5)
> 
> LVM has a Physical Volumegroup (KI) on partition 7
> The system runs a PostgreSQL Database (version 7.1.3). The Data-Structures
> live on a Logical-Volume-Group which was mounted as /var/lib/postgres as
> a ext3 filesystem. Everything was working until 4 hours ago, before LVG
> was resized.

> II. Changes
> 
> The LVG /dev/ki/postgres was reduced from 8 GB to 800MB. Before we did that
> a df has shown a used size of 366 MB data.
> Postgres was shut down. No other process was writing to /dev/ki/postgres.
> 
>      # e2fsadm --size - 4,5G 
> 
> Worked out, but remounting has shown incorrect structure.

I have never seen it used with "- 4,5G".  I don't know what the
program would do in this case.

> A new LVG was created 
> 
>     # lvcreate    --size 2,5G --name opt /dev/ki/opt

This was created after the other one was shrunk?  Did you create a
filesystem on it?

> The sysadmin was running a vgscan an lvscan. Afterwards he runs 
> 
>     # e2fsck -y -f /dev/ki/postgres
> 
> now the mount on /var/lib/postgres was successful, but all date were gone!
> I found a long list of dir-entries in the lost+found subdir. No file-entries.
> 
> What can we do?

Do you have any output from e2fsck?  It is likely that by running e2fsck
you have removed any chance of further recovery.  If the filesystem was
not resized properly before the LV was shrunk, and then you ran e2fsck
on it, it will have corrupted much of the filesystem data structures
because it was unable to access the larger part of the filesystem.

What is the structure of the filesystem that was in ki/postgres?  Did it
only have a few large DB files, or many smaller files?  What I would
suggest is to look into the directories under lost+found and see if your
database files are located therein.  It may be that the data in them
is corrupt, or that you are missing a lot of files.

If you did not create any filesystems on ki/opt, then it might be
possible to recover some of the data from the rest of the disk.  That
would be quite hard to do, however.

Cheers, Andreas
--
Andreas Dilger
http://www-mddsp.enel.ucalgary.ca/People/adilger/
http://sourceforge.net/projects/ext2resize/

      parent reply	other threads:[~2002-04-22 12:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-22 10:14 [linux-lvm] Desater Recovery <urgent> Ralf Zerres
2002-04-22 12:05 ` Joe Thornber
2002-04-22 12:13   ` Ralf Zerres
2002-04-22 12:22     ` Joe Thornber
2002-04-22 12:32       ` Andreas Dilger
2002-04-23  1:43         ` Bas
2002-04-25  4:00           ` Heinz J . Mauelshagen
2002-04-22 12:25 ` Andreas Dilger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020422172436.GE3017@turbolinux.com \
    --to=adilger@clusterfs.com \
    --cc=linux-lvm@sistina.com \
    --cc=rzerres@networkx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.