All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinz Mauelshagen <hjm@redhat.com>
To: nick@gushlow.com,
	LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] LVM Problems when moving data off a PV
Date: Mon, 15 Mar 2004 13:34:45 +0100	[thread overview]
Message-ID: <20040315123445.GA17078@redhat.com> (raw)
In-Reply-To: <1079271129.2414.7.camel@rockley.barbados>

On Sun, Mar 14, 2004 at 01:32:09PM +0000, Nick Gushlow wrote:
> I've got a volume group (vg2) that spans 3 partitions on two disks;
> hdb1, hdb5, hdc.  hdb1 and hdb5 are the only partitions on disk hdb.
> 
> Disk hdb is failing and I've got an identical replacement from Maxtor,
> so I stuck the new disk in and tried to follow the instructions on the
> LVM howto for removing a disk. 
> 
> I've successfully transfered hdb5 to the new disk (hdd) but I got an
> error when trying to move hdb1; I can't remember that error now but I am
> assuming that there may be damage to that part of the disk as the disk
> is failing.
> 
> After trying a few things I found on the lvm lists and other places and
> I'm now at a stage where a vgscan reports

Nick,

what exactly were those 'things' ?

> 
> ------------------------------------------------------------------------
> vgscan -- only found 4253 of 4267 LEs for LV /dev/vg2/storage (0) 
> vgscan -- ERROR "vg_read_with_pv_and_lv(): allocated LE of LV" can't get
> data of volume group "vg2" from physical volume(s)
> ------------------------------------------------------------------------

You need to select the last valid metadata backup of vg2 from /etc/lvmconf
(check it with vgcfgrestore -ll -f /etc/lvmconf/vg2.conf[.#.old]; see
'man vgcfgrestore for metadata archive file names) and restore it.

Say vg.conf.1.old is the valid one:

for dev in AllPVsOfVG2 # list all PVs reported by vgcfgrestore -ll above
do
	pvcreate -ff $dev
	vgcfgrestore -f /etc/lvmconf/vg.conf.1.old $dev
done
vgscan
vgchange -ay vg2

> 
> I tried a couple of things from very old posts I found on the lvm
> mailing list including compiling LVM2 from cvs so I could do a vgreduce
> --removemissing but that didn't work (I assume because they are lvm1) 

The LVM2 tools support LVM1 metadata format.
What went wrong running vgreduce --removemissing ?

In order to activate LVM1 VGs with LVM2, you need a kernel with device-mapper.

> 
> Can anyone tell me what might be wrong, and more importantly how I can
> get the volume group back up. 

See vgcfgrestore above.

> 
> I am assuming that as the data is spread across 3 disks if I can't
> recover from this error then I will have lost everything on them. 
> 
> Unfortunately I don't have a backup because I have nothing large enough
> to backup the data in the volume group. 

<preach>
You need backups in order to be able to survive user/sw/hw failure.
</preach>

> 
> TIA,
> 
> Nick Gushlow.
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

-- 

Regards,
Heinz    -- The LVM Guy --

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

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

Heinz Mauelshagen                                 Red Hat GmbH
Consulting Development Engineer                   Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@RedHat.com                            +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  reply	other threads:[~2004-03-15 12:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-14 13:32 [linux-lvm] LVM Problems when moving data off a PV Nick Gushlow
2004-03-15 12:34 ` Heinz Mauelshagen [this message]
2004-03-15 21:02   ` Nick Gushlow
2004-03-16 23:04   ` Nick Gushlow
2004-03-17 14:31     ` Heinz Mauelshagen
2004-03-17 20:03       ` Nick Gushlow
2004-03-18 16:21         ` Heinz Mauelshagen

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=20040315123445.GA17078@redhat.com \
    --to=hjm@redhat.com \
    --cc=linux-lvm@redhat.com \
    --cc=nick@gushlow.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 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.