Linux LVM users
 help / color / mirror / Atom feed
From: "Heinz J . Mauelshagen" <mauelshagen@sistina.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] How to fix inconsistent LV structs?
Date: Wed Oct  9 06:24:01 2002	[thread overview]
Message-ID: <20021009132310.D23965@sistina.com> (raw)
In-Reply-To: <878z1atmqp.fsf@mail.raffael.ch>; from herzog@raffael.ch on Mon, Oct 07, 2002 at 03:14:06PM +0200

On Mon, Oct 07, 2002 at 03:14:06PM +0200, Raffael Herzog wrote:
> Hi Heinz,
> 
> Heinz J . Mauelshagen wrote:
> 
> > nothing in the log directly related to LVM :(
> > But your hint WRT naming devices could help us.
> > Do you have devfs mounted on /dev and don't use the full devfs
> > names in all cases?
> 
> I don't use devfs at all (yet), but the device nodes were
> present all the time. What do you mean with "full devfs
> names"?

I meant nasty devfs names like /dev/scsi/host0/bus0/target0/lun0/part1 ;)

But as you say, you don't use it, which brings us back to the overwrite
assumption and the necessary vgcfgrestore's.

I recommend to save the metadata of all PVs belonging to the gone VG
for potential later analysis with "dd if=/dev/PV of=PV.vgda bs=1k count=4k".
Insert all your PVs (say AllPVs) in sequence for "PV"
(i.e. for PV in AllPVs; do dd if=/dev/$PV of=${PV}.vgda bs=1k count=4k;done).

The procedure to restore your metadata to all those PVs goes:

- run "pvcreate -yff AllPVs"
- run "for PV in AllPVs;do vgcfgrestore -n NameOfTheVG /dev/$PV;done"
- run "vgscan ; vgchange -ay"

Should be it...

> 
> Maybe these excerpts of the output of pvdata help (this is
> from a run after I did pvcreate -ff):
> 
> ,----[ pvdata -d /dev/hda7 ]
> | [...]
> | <1> lv_copy_from_disk -- CALLED
> | <1> lv_copy_from_disk -- LEAVING
> | <1> lv_check_consistency -- CALLED
<SNIP>
> `----
> 
> So you see, there was really a lot of garbage... :-)

Was likely if overwriten.

> 
> I also saved the outputs of pvscan -d and vgscan -d, in case
> you think they help.

Well, they should just harden the garbage ;)

> 
> 
> > If so, please retry giving the full names.
> 
> I can't try anything anymore because I decided not to use
> LVM anymore at least until I know what happened and I know
> that it won't happen again. Sure, it's probably not the
> fault of LVM, but I think, if I would have been using "plain
> ext2/3", I probably wouldn't have lost just *all* of my data
> (lucky that I had a very young backup, so I actually didn't
> loose anything).

That depends on the nature of the overwrite. Could at least kill a filesystem
if enough is written to the device.

Regards,
Heinz    -- The LVM Guy --

> 
> cu,
> 
>    Raffi
> 
> 
> -- 
> => Neu im Usenet? Fragen?    http://www.use-net.ch/usenet_intro_de.html <=
>   The difference between theory and practice is that in theory, there is
>                  no difference, but in practice, there is.
> Raffael Herzog - herzog@raffael.ch - http://www.raffael.ch - ICQ #67961355
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

      reply	other threads:[~2002-10-09  6:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-05 17:48 [linux-lvm] How to fix inconsistent LV structs? Raffael Herzog
2002-10-07  3:53 ` Heinz J . Mauelshagen
2002-10-07  4:29   ` Raffael Herzog
2002-10-07  5:35     ` Glenn Shannon
2002-10-07  6:32       ` Raffael Herzog
2002-10-07  6:43     ` Heinz J . Mauelshagen
2002-10-07  8:40       ` Raffael Herzog
2002-10-09  6:24         ` Heinz J . Mauelshagen [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=20021009132310.D23965@sistina.com \
    --to=mauelshagen@sistina.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