All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heinz J . Mauelshagen" <mauelshagen@sistina.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] Removing an old disk, and some vgexport/import love..
Date: Thu Sep 19 05:00:02 2002	[thread overview]
Message-ID: <20020919115935.A32578@sistina.com> (raw)
In-Reply-To: <002001c25fa7$482b2740$ccc67140@ownage>; from lightning@aci.net on Wed, Sep 18, 2002 at 11:39:19PM -0700

On Wed, Sep 18, 2002 at 11:39:19PM -0700, Matt wrote:
> Helu,
> 
>  
> 
> I am in dire need of some help.I recently removed an old disk from my PV
> and added a new one  
> 
>  in place of the old one.
> 
> e.g.
> 
>             
> 
> pvmove garage /dev/hdj1 /dev/hde1 (hde1 being the new drive)
> 
>  
> 
> The physical extents moved over to the new drive and everything was
> looking good until
> 
> I made a pretty big mistake, I figured I'd need to export the group
> 'garage' and import it.
> 
> Wrong! Now when I go and try to import my group it freaks stating:
> 
>             
> 
>             # vgimport garage /dev/hde1 /dev/hdg1 /dev/hdf1
> 
> vgimport -- ERROR: wrong number of physical volumes to import volume
> group "garage"

Matt,

you didn't need to export the volume group unless you want to move it to 
a different system. It looks like you exported the VG and removed /dev/hdj1,
right?

If that assumption is true, you still need /dev/hdj1 in order to get your
VG back.

Then do the following:

# vgimport garage /dev/hd[efgj]1
# vgchange -ay garage
# vgreduce garage /dev/hdj1

That should bring your VG back and reduce it by the empty /dev/hdj1
physical volume.

You can physically remove /dev/hdj1 afterwards if you want to.

Regards,
Heinz    -- The LVM Guy --

> 
>  
> 
> I can't do a vgcfgrestore either, because it is currently exported and I
> am not sure if that would
> fix anything anyways. Here is some more information:
> 
>  
> 
>             # pvscan
> 
> pvscan -- reading all physical volumes (this may take a while...)
> 
> pvscan -- inactive PV "/dev/hdg1"  is in EXPORTED VG "garage" [74.55 GB
> / 0 free]
> 
> pvscan -- inactive PV "/dev/hde1"  is in EXPORTED VG "garage" [76.33 GB
> / 0 free]
> 
> pvscan -- inactive PV "/dev/hdf1"  is in EXPORTED VG "garage" [74.52 GB
> / 60.21 GB free]
> 
> pvscan -- total: 3 [225.42 GB] / in use: 3 [225.42 GB] / in no VG: 0 [0]
> 
>  
> 
>             vgscan -d output can be found at:
> http://www.planetgarage.net/vgscan.txt (long)
> 
>  
> 
> root@deify:~ # vgdisplay -Dv
> 
> vgdisplay -- WARNING: volume group "garagePV_EXP" is exported
> 
> --- Volume group ---
> 
> VG Name               garagePV_EXP
> 
> VG Access             read/write
> 
> VG Status             NOT available/exported/resizable
> 
> VG #                  0
> 
> MAX LV                256
> 
> Cur LV                1
> 
> Open LV               0
> 
> MAX LV Size           255.99 GB
> 
> Max PV                256
> 
> Cur PV                3
> 
> Act PV                3
> 
> VG Size               225.41 GB
> 
> PE Size               4 MB
> 
> Total PE              57705
> 
> Alloc PE / Size       42290 / 165.20 GB
> 
> Free  PE / Size       15415 / 60.21 GB
> 
> VG UUID               fs8lXY-bca9-tFHT-yv8g-HP7U-Ssh7-v13m9h
> 
>  
> 
> --- Logical volume ---
> 
> LV Name                /dev/garage/LLAMA
> 
> VG Name                garage
> 
> LV Write Access        read/write
> 
> LV Status              NOT available
> 
> LV #                   1
> 
> # open                 0
> 
> LV Size                165.20 GB
> 
> Current LE             42290
> 
> Allocated LE           42290
> 
> Allocation             next free
> 
> Read ahead sectors     120
> 
> Block device           58:0
> 
>  
> 
>  
> 
> --- Physical volumes ---
> 
> PV Name (#)           /dev/hde1 (1)
> 
> PV Status             available / allocatable
> 
> Total PE / Free PE    19541 / 0
> 
>  
> 
> PV Name (#)           /dev/hdg1 (3)
> 
> PV Status             available / allocatable
> 
> Total PE / Free PE    19086 / 0
> 
>  
> 
> PV Name (#)           /dev/hdf1 (4)
> 
> PV Status             available / allocatable
> 
> Total PE / Free PE    19078 / 15415
> 
>  
> 
>  
> 

*** 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-09-19  5:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-19  1:39 [linux-lvm] Removing an old disk, and some vgexport/import love Matt
2002-09-19  5:00 ` Heinz J . Mauelshagen [this message]
2002-09-19  6:13   ` Matt
2002-09-19  8:48     ` Heinz J . Mauelshagen
2002-09-19  9:50     ` Christian Limpach
2002-09-19 16:46       ` Matt
2002-09-20  4:44         ` Heinz J . Mauelshagen
2002-09-20  5:23           ` Matt
2002-09-20  5:38             ` Heinz J . Mauelshagen
2002-09-20  6:07               ` Heinz J . 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=20020919115935.A32578@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 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.