[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] rescuing a VG with one missing PV



On Tue, Feb 12, 2002 at 02:58:17PM +0200, Erkki Seppala wrote:
> On Tue, Feb 12, 2002 at 10:22:28AM +0100, Heinz J . Mauelshagen wrote:
> > On Mon, Feb 11, 2002 at 10:53:25PM +0200, Erkki Seppala wrote:
> > > The drive I got was two gigabytes smaller than the original, and thus:
> > > 
> > > The original disc was:
> > > 
> > >   PVs: [AN] ide/host0/bus0/target1/lun0/part1 60030976 /3664    
> > > 		21331968 /1302    38699008/2362  
> > > 
> > > and it now is 58633312 blocks according to fdisk.
> > 
> > Change your partition to have the very same size as before and vgcfgrestore.
> 
> Thanks for the suggestion, and I would very much like to do that, but
> as I said, the replacement drive is a bit smaller than the old one,
> thus I cannot make as big partition :-).

Sorry, missed that :-(

> 
> I was considering hacking vgcfgrestore to ignore the fact that the
> size mismatches, are there problems to be expected? Like severe VG
> corruption.. I might just as well try anything, it can't be any worse
> than the current situation.

Get LVM from CVS at www.sistina.com and either use the -s option of pvcreate
I implemented recently to fake the size you need or run "vgcfgrestore -i ..."
which ignores the size of the device and restores metadata anyway
at your own risk.

Both will only help if you don't have data in the last 2 GB, because you
can't pvmove it away. Even though you lost your data anyway with the old drive,
you need to either pvmove it away to get rid of allocated extents in that PV
again or lvreduce LVs to make them free which you potentially don't like,
because the extents might be further to the beginning of the LV.

> 
> -- 
>   _____________________________________________________________________
>      / __// /__ ____  __                              Erkki Seppälä\   \
>     / /_ / // // /\ \/ //ircnet                           Modeemi Ry\  /
>    /_/  /_/ \___/ /_/\_\ modeemi fi        http://www.modeemi.fi/~flux/
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm sistina com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

Regards,
Heinz    -- The LVM Guy --

*** 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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]