linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Question on duplicating equally-sized HDs with dd and changing VG name and PV UUIDs
@ 2007-09-07 12:13 Holger Rauch
  2007-09-07 17:53 ` Lars Ellenberg
  0 siblings, 1 reply; 9+ messages in thread
From: Holger Rauch @ 2007-09-07 12:13 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1734 bytes --]

Hi,

I got a machine having two HDs of the same size (250 GB each), devices
/dev/sda and /dev/sdb. /dev/sda contains VG rootvg which in turn contains
several LVs. VG rootvg consists of one PV, /dev/sda5. All this was set up
using LVM2.

I want to have the same HD partition/VG/LV layout on /dev/sdb with the
following differences:

- A different VG name: backupvg instead of rootvg
- A different UUID for PV /dev/sdb5 (since that's supposed to be the underlying
  PV for VG backupvg)

Purpose of that setup is to be able to easily copy filesystem contents
between filesystems located on LVs of the same name but in different VGs.
(Apart from that, the filesystems are of the same type and size).

I looked at the LVM2 FAQ, the LVM HOWTO and googled but unfortunately
there seems to be no HOWTO for this task (which still seems somewhat
common to me since many PCs these days contain 2 equally-sized HDs).

I know that

dd if=/dev/sda of=/dev/sdb

is going to give me the same partition layout but what LVM commands can I
use for the following tasks (provided that the newly created VG is not
online yet):

- Generating a new UUID and assigning that to PV /dev/sdb5
- Renaming a VG while it's offline. Does vgrename support this?
- "Telling" the renamed VG about the fact that /dev/sdb5 has got a new UUID
  but still it's supposed to be used as the underlying PV for VG backupvg

I also know that LVM2 metadata resides in /etc/lvm but I don't feel
confident playing around there without having additional information
(provided this is the right place to look at for the above mentioned tasks).

Thanks in advance for any hints, links, etc.

In case there are any additional questions, please feel free to ask.

Kind regards,

	Holger

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2007-09-19 16:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-07 12:13 [linux-lvm] Question on duplicating equally-sized HDs with dd and changing VG name and PV UUIDs Holger Rauch
2007-09-07 17:53 ` Lars Ellenberg
2007-09-10  8:59   ` Holger Rauch
2007-09-10 17:17     ` malahal
2007-09-11 10:00       ` Holger Rauch
2007-09-11 10:12         ` Holger Rauch
2007-09-12  0:21           ` LVM UUID generation (was Re: [linux-lvm] Question on duplicating equally-sized HDs with dd and changing VG name and PV UUIDs) Daniel Tuijnman
2007-09-17 21:19           ` [linux-lvm] Question on duplicating equally-sized HDs with dd and changing VG name and PV UUIDs Alasdair G Kergon
2007-09-19 16:04             ` Holger Rauch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).