All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] vgcfgrestore ouput
@ 2002-10-20 20:20 Austin Gonyou
  2002-10-21  2:18 ` Patrick Caulfield
  0 siblings, 1 reply; 4+ messages in thread
From: Austin Gonyou @ 2002-10-20 20:20 UTC (permalink / raw)
  To: linux-lvm

I tarred up the /etc/lvm* stuff from one box that has a similar
configuration (two whole disks, /dev/sdb and /dev/sdc, in one vg), and
then put it on my target host and attempted to restore the
configuration. 

Below is the output I get. I guess, all I need to know right now, is are
the first 512 bytes of each disk all that is used for the pv
information, or is it more than that? 

Also, can pvcreate be used without destroying the underlying
filesystems? TIA!!!

<vgcfgrestore>
[root@localhost root]# vgcfgrestore -n data /dev/sdb
vgcfgrestore -- INFO: using backup file "/etc/lvmconf/data.conf"
vgcfgrestore -- ERROR "pv_read(): PV identifier invalid" reading
physical volume "/dev/sdb"

[root@localhost root]# vgcfgrestore -n data /dev/sdc
vgcfgrestore -- INFO: using backup file "/etc/lvmconf/data.conf"
vgcfgrestore -- ERROR "pv_read(): PV identifier invalid" reading
physical volume "/dev/sdc"
</vgcfgrestore>


Austin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] vgcfgrestore ouput
  2002-10-20 20:20 [linux-lvm] vgcfgrestore ouput Austin Gonyou
@ 2002-10-21  2:18 ` Patrick Caulfield
  2002-10-21  2:59   ` Austin Gonyou
  0 siblings, 1 reply; 4+ messages in thread
From: Patrick Caulfield @ 2002-10-21  2:18 UTC (permalink / raw)
  To: linux-lvm

On Sun, Oct 20, 2002 at 08:20:16PM -0500, Austin Gonyou wrote:
> 
> I tarred up the /etc/lvm* stuff from one box that has a similar
> configuration (two whole disks, /dev/sdb and /dev/sdc, in one vg), and
> then put it on my target host and attempted to restore the
> configuration. 
> 
> Below is the output I get. I guess, all I need to know right now, is are
> the first 512 bytes of each disk all that is used for the pv
> information, or is it more than that? 
> 
> Also, can pvcreate be used without destroying the underlying
> filesystems? TIA!!!
> 
> <vgcfgrestore>
> [root@localhost root]# vgcfgrestore -n data /dev/sdb
> vgcfgrestore -- INFO: using backup file "/etc/lvmconf/data.conf"
> vgcfgrestore -- ERROR "pv_read(): PV identifier invalid" reading
> physical volume "/dev/sdb"
> 
> [root@localhost root]# vgcfgrestore -n data /dev/sdc
> vgcfgrestore -- INFO: using backup file "/etc/lvmconf/data.conf"
> vgcfgrestore -- ERROR "pv_read(): PV identifier invalid" reading
> physical volume "/dev/sdc"
> </vgcfgrestore>
> 

It'll be fine :-) just

# pvcreate /dev/sdb
# pvcreate /dev/sdc

and then issue the vgcfgrestore commands you have above.

then 

vgscan && vgchange -ay
-- 

patrick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] vgcfgrestore ouput
  2002-10-21  2:18 ` Patrick Caulfield
@ 2002-10-21  2:59   ` Austin Gonyou
  2002-10-21  3:12     ` Patrick Caulfield
  0 siblings, 1 reply; 4+ messages in thread
From: Austin Gonyou @ 2002-10-21  2:59 UTC (permalink / raw)
  To: linux-lvm

> 
> It'll be fine :-) just
> 
> # pvcreate /dev/sdb
> # pvcreate /dev/sdc
> 
> and then issue the vgcfgrestore commands you have above.

My only worry about this, is that the configuration I have, is from
smaller disks. I don't know if that will screw my FS or not. :(
> then 
> 
> vgscan && vgchange -ay
> -- 
> 
> patrick
> 
> 
> _______________________________________________
> 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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] vgcfgrestore ouput
  2002-10-21  2:59   ` Austin Gonyou
@ 2002-10-21  3:12     ` Patrick Caulfield
  0 siblings, 0 replies; 4+ messages in thread
From: Patrick Caulfield @ 2002-10-21  3:12 UTC (permalink / raw)
  To: linux-lvm

On Mon, Oct 21, 2002 at 02:59:09AM -0500, Austin Gonyou wrote:
> > 
> > It'll be fine :-) just
> > 
> > # pvcreate /dev/sdb
> > # pvcreate /dev/sdc
> > 
> > and then issue the vgcfgrestore commands you have above.
> 
> My only worry about this, is that the configuration I have, is from
> smaller disks. I don't know if that will screw my FS or not. :(

Ah, you mean the LVM metadata is not actually from the sdb/sdc as they really
were?

It's a bit dodgy. but if LVM can activate the VG (no guarantee unless you have
EXACTLY recreated the old metadata) then you should be able to mout the
filesystems readonly to see what is recoverable.

If you don't have the original LVM metadata anything you do is going to be
rather risky.

One thing you could do (if you know EXACTLY how your original LVs were created)
is to use the two smaller disk and pvcreate them with --size to fake the size of
them to be the same as the bigger disks. Then create your VGs and LVs as you
KNOW they were(!). Then vgcfgrestore /that/ metadata onto the bigger disks.

If you want interactive help on this join us on irc.openprojects.net #lvm

patrick

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-10-21  3:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-20 20:20 [linux-lvm] vgcfgrestore ouput Austin Gonyou
2002-10-21  2:18 ` Patrick Caulfield
2002-10-21  2:59   ` Austin Gonyou
2002-10-21  3:12     ` Patrick Caulfield

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.