* [linux-lvm] Copy LVs
@ 2007-09-26 9:50 Peter Larsen
2007-09-26 14:18 ` Stuart D. Gathman
2007-09-26 16:08 ` Chris Cox
0 siblings, 2 replies; 3+ messages in thread
From: Peter Larsen @ 2007-09-26 9:50 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 221 bytes --]
What's the "official" procedure of cloning Volume Groups or Logical
Volumes across systems?
Let's say I want to clone the OS to a new box. Do I dd everything over,
or is there a better "lvm" way?
Regards
Peter Larsen
[-- Attachment #2: plarsen.vcf --]
[-- Type: text/x-vcard, Size: 310 bytes --]
begin:vcard
fn:Peter Larsen
n:Larsen;Peter
org:Ciber Inc.;Federal Security Division
adr:Suite A515;;7900 Westpark Dr.;McLean;VA;22102;USA
email;internet:plarsen@ciber.com
title:Principal Consulant
tel;work:703 610 6442
tel;cell:540 847 0856
x-mozilla-html:FALSE
url:http://www.ciber.com
version:2.1
end:vcard
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] Copy LVs
2007-09-26 9:50 [linux-lvm] Copy LVs Peter Larsen
@ 2007-09-26 14:18 ` Stuart D. Gathman
2007-09-26 16:08 ` Chris Cox
1 sibling, 0 replies; 3+ messages in thread
From: Stuart D. Gathman @ 2007-09-26 14:18 UTC (permalink / raw)
To: LVM general discussion and development
On Wed, 26 Sep 2007, Peter Larsen wrote:
> What's the "official" procedure of cloning Volume Groups or Logical
> Volumes across systems?
>
> Let's say I want to clone the OS to a new box. Do I dd everything over,
> or is there a better "lvm" way?
Pardon a little "blue sky" here. There is a better way that is easy
to script for a particular case, but there is no robust general purpose
script for linux - yet. This description is patterned off of AIX vgsave.
1) From source vg, write text description of all logical volumes. Keep in
mind that "vgrest" has to parse it reliably - so simply copying the
VG metadata, already in text form for LVM2, is not necessarily the
best approach. For one, I would write a script that creates
logical volumes with the same names and sizes. For two, the description
needs additional metadata similar to that collected by a linux installer -
where LV is mounted, filesystem type, swap partition, etc.
I can see creating a directly executable shell script here, or perhaps
XML or other structured data and a python script to parse and execute it.
2) Create target VG, and create all logical volumes from script/data.
(Optional - resize file system LVs to minimum required to restore archive.)
3) rsync, or tar and untar (preserving extended attributes) each
logical volume, format swap partitions.
When cloning to a tape, write the VG metadata (or simplified description)
first, followed by tar archives of each LV. AIX saves only mounted LVs,
and creates one big archive, remembering where each LV was mounted in the
metadata. I'm not convinced that is the best approach.
In short, something like vgsave and vgrest that could clone a VG directly
to a target and/or to tape/archive file would be a great addition to LVM.
I will even write it, but it will be at least 6 months before I can get
past a lot of system upgrades - so feel free to beat me to it.
--
Stuart D. Gathman <stuart@bmsi.com>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] Copy LVs
2007-09-26 9:50 [linux-lvm] Copy LVs Peter Larsen
2007-09-26 14:18 ` Stuart D. Gathman
@ 2007-09-26 16:08 ` Chris Cox
1 sibling, 0 replies; 3+ messages in thread
From: Chris Cox @ 2007-09-26 16:08 UTC (permalink / raw)
To: LVM general discussion and development
Peter Larsen wrote:
> What's the "official" procedure of cloning Volume Groups or Logical
> Volumes across systems?
>
> Let's say I want to clone the OS to a new box. Do I dd everything over,
> or is there a better "lvm" way?
Across platforms on a network? Probably no "lvm" way. I'd use
rsync, but you could to a compressed/gzip'd tar, or whatever depending
on your bandwidth.
(I'd setup the vg's and lv's independently before doing the copy)
If it's a pure migration, in the future you might want to look
at a standalone subsystem that could simply be moved from one
platform to the next (or some other migratable drive soln... even
if it's just moving the drives themselves).
>
> Regards
> Peter Larsen
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-09-26 16:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-26 9:50 [linux-lvm] Copy LVs Peter Larsen
2007-09-26 14:18 ` Stuart D. Gathman
2007-09-26 16:08 ` Chris Cox
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.