linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolabs.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] Disk Died - Ideas?
Date: Tue, 25 Sep 2001 11:09:09 -0600	[thread overview]
Message-ID: <20010925110909.D392@turbolinux.com> (raw)
In-Reply-To: <3BB09C88.8234FDE4@lmco.com>

On Sep 25, 2001  11:02 -0400, Jeff Layton wrote:
>    Well, of course, the last disk gave up the ghost (lots of SCSI
> errors, machine will not boot without unplugging drives from
> machine). I'm pretty sure you can guess what I'm going to ask :)
> Can I just unplug the last drive, bring the system up, don't run
> fsck on lvol1, mount lvol1, and try to pull as much data as I can
> off what's left of the filesystem? If this works, then I can just
> redo the PVs, the VGs, and the LVOLs and recreate the filesystem
> and move over what data I can recover.

Two ways to do it.  I _think_ the latest release of EVMS will allow you
to have partial LVs like this.  Are you sure that the LV was using space
on the last PV?  If so it is less likely to work.

The other alternative is to take the output from "pvdata -avP <dev>" on
each remaining disk, and manually "dd" out the data from each disk.  If
the LV was mostly consecutive PEs, then it will be easy, otherwise a lot
of work (you may want to write a tool if so).

PE 0 data starts at (pe_on_disk.start + pe_on_disk.size), and is in chunks
of PE size.  The pvdata output will tell you which PE numbers belonged to
your LV, so let's say on the first PV this LV starts at PE 10, you want:

(pe_on_disk.start + pe_on_disk.size) + 10 * pe_size = byte offset of LV

This will probably be at least a multiple of 1024, but maybe 4096 (larger
will make for faster dd).  Then, for the number of consecutive PEs on disk:

count=<number of consecutive IN ORDER PEs> * pe_size / 1024 = consecutive kB

dd if=/dev/pv1 of=<backup> bs=1024 skip=<offset #1 in kB> count=<count #1>

Do the same thing for the next set of consecutive PEs, with:

dd if=/dev/pv1 of=<backup> bs=1024 skip=<offset #2 in kB> \
	seek=<count #1> count=<count #2>

dd if=/dev/pv1 of=<backup> bs=1024 skip=<offset #3 in kB> \
	seek=<count #1 + count #2> count=<count #3>


>    Oh, by the way, this filesystem had no backups. The powers
> to be claimed they were working on a backup solution for us,
> but they didn't get one in place by the time this drive died. I know,
> I know. I screamed very loudly, made lots of enemies internally,
> but still no backups were ever done.

Never trust anyone w.r.t backups.  I got burned this way as well.  Also
make sure they have a RESTORE system, and not just a BACKUP system (i.e.
make sure they can get your data back from tape).

Cheers, Andreas
--
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

  parent reply	other threads:[~2001-09-25 17:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-25 15:02 [linux-lvm] Disk Died - Ideas? Jeff Layton
2001-09-25 16:56 ` lembark
2001-09-25 17:09 ` Andreas Dilger [this message]
2001-09-27 11:39   ` Jeff Layton
2001-09-27 14:40     ` Steven Lembark
2001-09-27 15:55       ` Andreas Dilger
2001-09-27 15:32         ` Kevin Corry
2001-09-27 16:09         ` Steven Lembark
2001-09-27 15:42     ` Andreas Dilger

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=20010925110909.D392@turbolinux.com \
    --to=adilger@turbolabs.com \
    --cc=linux-lvm@sistina.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).