OpenVZ Forum

Home » General » Discussions » Cloning VE to alternative partitions with persistent snap-shots (Using the mirrordir program)
Cloning VE to alternative partitions with persistent snap-shots [message #39881] Mon, 14 June 2010 21:00
lars.bailey is currently offline  lars.bailey
Messages: 38
Registered: April 2010
I found a method of cloning a VE to a given partition and
keeping a persistent snap-shot,by using "mirrordir".
In a nut-shell,I run OVZ the old fashion way,with a twist.
I have the regular "/vz" directory that serves as a "cache-all" of
all VE containers,using RAID1.(no pun intended)
Each VE,is cloned to run on its own partition using RAID0.(this conserves disk space and is a set size) It can be increased using LVM.
Using the "mirrordir" software,I clone the specific VE to a partition,usually named for the VE.(i.e /101,/102,etc...) All that is needed from there,is editing of the VE's config file,to point to the specific directory.(partition)
I can then use mirrordir,to send "snap-shots" of the "private" directory back to my "cache-all",of any file changes,via CRON.
The only downside,is that mirrordir will not clone the VE's root directory,if the VE is running.
This is not much of an inconvenience for me,as my VE builder script offers this option,before it brings the VE on-line.
If RAID0 fails,I can run a container "re-start" wrapper script,to load a backup copy of the default VE configuration,and run from "cache-all".
Thought it may help someone,or worth a try.
Previous Topic: Using "openvz" in the name of open source project
Next Topic: Open Nas Template
Goto Forum:

Current Time: Tue Sep 26 16:53:02 GMT 2023

Total time taken to generate the page: 0.02138 seconds