/[vz-tools]/trunk/vz-clone.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Log of /trunk/vz-clone.pl

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (annotate)
Sticky Revision:

Revision 74 - (view) (annotate) - [select for diffs]
Modified Mon Mar 9 19:09:22 2009 UTC (15 years ago) by dpavlin
File length: 5103 byte(s)
Diff to previous 73 , to selected 27
rewrite /dev/mapper/vg-lv to /dev/vg/lv

Revision 73 - (view) (annotate) - [select for diffs]
Modified Mon Mar 9 19:04:19 2009 UTC (15 years ago) by dpavlin
File length: 5004 byte(s)
Diff to previous 69 , to selected 27
use VZ.pm to correctly detect vz location and
try to guess correct params when vz doesn't have
it's own logical volume (still broken)


Revision 69 - (view) (annotate) - [select for diffs]
Modified Tue Mar 3 20:58:48 2009 UTC (15 years ago) by dpavlin
File length: 5013 byte(s)
Diff to previous 67 , to selected 27
fix destroy

Revision 67 - (view) (annotate) - [select for diffs]
Modified Sat Feb 28 16:32:12 2009 UTC (15 years, 1 month ago) by dpavlin
File length: 4959 byte(s)
Diff to previous 66 , to selected 27
enlarge snapshot to 10G and add iptable rule

Revision 66 - (view) (annotate) - [select for diffs]
Modified Fri Feb 27 20:49:06 2009 UTC (15 years, 1 month ago) by dpavlin
File length: 4923 byte(s)
Diff to previous 65 , to selected 27
remove snapshot on destroy

Revision 65 - (view) (annotate) - [select for diffs]
Modified Fri Feb 27 20:05:02 2009 UTC (15 years, 1 month ago) by dpavlin
File length: 4777 byte(s)
Diff to previous 64 , to selected 27
implement clone on live snapshot with quota turned off
to speed up first startup (which would otherwise check
quota for whole vz logical volume)

Revision 64 - (view) (annotate) - [select for diffs]
Modified Fri Feb 27 18:41:06 2009 UTC (15 years, 1 month ago) by dpavlin
File length: 4748 byte(s)
Diff to previous 62 , to selected 27
rest of m{} patterns

Revision 62 - (view) (annotate) - [select for diffs]
Modified Fri Feb 27 18:37:34 2009 UTC (15 years, 1 month ago) by dpavlin
File length: 4748 byte(s)
Diff to previous 50 , to selected 27
better s{}{} delimiters so we don't confuse vim syntax hightlight

Revision 50 - (view) (annotate) - [select for diffs]
Modified Thu Aug 14 22:49:05 2008 UTC (15 years, 7 months ago) by dpavlin
File length: 4745 byte(s)
Diff to previous 33 , to selected 27
fix iptables with cloned IP number

Revision 33 - (view) (annotate) - [select for diffs]
Modified Tue Oct 16 09:35:59 2007 UTC (16 years, 5 months ago) by dpavlin
File length: 4690 byte(s)
Diff to previous 31 , to selected 27
alternative ip mungling to 192.168.x.y

Revision 31 - (view) (annotate) - [select for diffs]
Modified Thu Oct 11 19:28:27 2007 UTC (16 years, 5 months ago) by dpavlin
File length: 4656 byte(s)
Diff to previous 30 , to selected 27
delete files on cloned VE which no longer exist on master to create perfect copy

Revision 30 - (view) (annotate) - [select for diffs]
Modified Fri Oct 5 01:09:12 2007 UTC (16 years, 5 months ago) by dpavlin
File length: 4644 byte(s)
Diff to previous 29 , to selected 27
cleanup umount sub-command: not accepts oritinal VE ID as
other commands do

Revision 29 - (view) (annotate) - [select for diffs]
Modified Fri Oct 5 01:01:13 2007 UTC (16 years, 5 months ago) by dpavlin
File length: 4711 byte(s)
Diff to previous 28 , to selected 27
added mount

Revision 28 - (view) (annotate) - [select for diffs]
Modified Fri Oct 5 00:28:43 2007 UTC (16 years, 5 months ago) by dpavlin
File length: 4634 byte(s)
Diff to previous 27
rsync directly to mounted directory insted through mount --bind

Revision 27 - (view) (annotate) - [selected]
Modified Thu Oct 4 23:42:24 2007 UTC (16 years, 5 months ago) by dpavlin
File length: 4632 byte(s)
Diff to previous 26
variable to skip snapshot usage,
fixed logic which machine to vzctl stop on create/destroy

Revision 26 - (view) (annotate) - [select for diffs]
Modified Thu Oct 4 23:23:20 2007 UTC (16 years, 5 months ago) by dpavlin
File length: 4347 byte(s)
Diff to previous 25 , to selected 27
clone lv are now always named vz-clone-10VEID and not
dependent on OpenVZ lv name

Revision 25 - (view) (annotate) - [select for diffs]
Modified Thu Oct 4 23:19:33 2007 UTC (16 years, 5 months ago) by dpavlin
File length: 4354 byte(s)
Diff to previous 24 , to selected 27
new syntax: subcommands create, umount and destroy

Revision 24 - (view) (annotate) - [select for diffs]
Modified Thu Oct 4 18:54:41 2007 UTC (16 years, 5 months ago) by dpavlin
File length: 3651 byte(s)
Diff to previous 23 , to selected 27
rsync know how to handle device and special files, ssync doesn't.
So it's out...

Revision 23 - (view) (annotate) - [select for diffs]
Modified Thu Oct 4 16:58:01 2007 UTC (16 years, 5 months ago) by dpavlin
File length: 3794 byte(s)
Diff to previous 22 , to selected 27
Create new logical volume for each clone of virtual machine.
That allows snapshots to actually works, because otherwise,
we would have to write content twice:

1. new cloned copy on disk
2. in snapshot (so that we see "old" copy)

This requires snapshot partition at least as big as filesystem
of cloned machine. It also slows down cloning. 

The root of the problem is usage of vg logical volume both as source
(which we want to have snapshot of to achieve consistent copy)
and destination for new cloned fs. Creating new logical volume per
VE cloned allows easy management and update also.

But, this might be optional (and there is fallback in the codei
if there is no lvm for vz data) if we want to create another
persistant clone (TODO).

If possible, we will try to use ssync binary (which sadly
isn't packaged for Debian) because it's much faster than
rsync.

Revision 22 - (view) (annotate) - [select for diffs]
Modified Thu Oct 4 13:19:26 2007 UTC (16 years, 5 months ago) by dpavlin
File length: 2342 byte(s)
Diff to previous 21 , to selected 27
hint how to add NAT rule for cloned VE

Revision 21 - (view) (annotate) - [select for diffs]
Modified Thu Oct 4 13:12:08 2007 UTC (16 years, 5 months ago) by dpavlin
File length: 2263 byte(s)
Diff to previous 20 , to selected 27
prepare and use temporary lvm snapshot while coping data,
annotate changed configuration variables,
new VE will have prefix 10 and first octet of IP adress 10.

Revision 20 - (view) (annotate) - [select for diffs]
Added Thu Oct 4 11:30:05 2007 UTC (16 years, 5 months ago) by dpavlin
File length: 903 byte(s)
Diff to selected 27
a simple script to create clone of VE

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

  ViewVC Help
Powered by ViewVC 1.1.26