OpenVZ Forum


Home » General » Support » Speed up ploop conversion
Speed up ploop conversion [message #49815] Thu, 20 June 2013 19:56 Go to next message
marksy is currently offline  marksy
Messages: 5
Registered: February 2008
Junior Member
We are migrating to a new DC and want to shift to ploop as we do. The conversion process, while effective, is just ungodly slow. Is there a way to do it manually so we can rsync a running VM, then shut down and do a final rsync before opening the new ploopified (yes i made that up) version?
Re: Speed up ploop conversion [message #49825 is a reply to message #49815] Fri, 21 June 2013 19:54 Go to previous messageGo to next message
marksy is currently offline  marksy
Messages: 5
Registered: February 2008
Junior Member
If there is a way for us to potentially hack the conversion code to do it, can someone point me in the right direction to get the code?
Re: Speed up ploop conversion [message #49846 is a reply to message #49815] Mon, 24 June 2013 16:56 Go to previous messageGo to next message
marksy is currently offline  marksy
Messages: 5
Registered: February 2008
Junior Member
For anyone who may come across this thread - I'll assume ploop uptake is non-existent based on the lack of interest in this thread, perhaps for good reason. We'll head down the KVM path and update with our experience.
Re: Speed up ploop conversion [message #49868 is a reply to message #49815] Wed, 26 June 2013 09:18 Go to previous messageGo to next message
skywryker is currently offline  skywryker
Messages: 1
Registered: June 2013
Location: USA
Junior Member
I am also planning to make this one.
Re: Speed up ploop conversion [message #49878 is a reply to message #49846] Thu, 27 June 2013 16:05 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
marksy wrote on Mon, 24 June 2013 18:56
For anyone who may come across this thread - I'll assume ploop uptake is non-existent based on the lack of interest in this thread, perhaps for good reason. We'll head down the KVM path and update with our experience.


Ploop is still experimental, although I find it very interesting. Judging from the occasional posts on the forum and in the mailing list, I'm sure it has some users already.

Anyway, why do say "perhaps for a good reason", any actual reason for that? Neutral
Re: Speed up ploop conversion [message #49915 is a reply to message #49815] Sat, 06 July 2013 00:41 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Do you do vzmigrate and then vzctl convert, or vise versa? Which step do you find slow?

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Speed up ploop conversion [message #49923 is a reply to message #49815] Sun, 07 July 2013 19:12 Go to previous messageGo to next message
marksy is currently offline  marksy
Messages: 5
Registered: February 2008
Junior Member
We followed the ploop doc: openvz.org/Ploop/Getting_started

No vzmigrate - we shut down the VE then ran vzctl convert CTID. Migrating the VE's to the new datacenter is done, we were attempting to convert to ploop in-place.
Re: Speed up ploop conversion [message #50551 is a reply to message #49815] Mon, 09 September 2013 09:36 Go to previous messageGo to next message
devonblzx is currently offline  devonblzx
Messages: 127
Registered: December 2006
Senior Member
<< Posted my updated script below which uses ploop init >>


http://static.openvz.org/userbars/openvz-user-2.png
ByteOnSite President

[Updated on: Sun, 16 February 2014 19:59]

Report message to a moderator

Re: Speed up ploop conversion [message #51472 is a reply to message #49815] Sat, 21 June 2014 14:47 Go to previous message
devonblzx is currently offline  devonblzx
Messages: 127
Registered: December 2006
Senior Member
Wanted to keep this thread updated for the ploop conversion script I wrote. There were some bugs in the old version that were reported. I applied some fixes and more checks. Ploop init also no longer sets a default filesystem, so I made sure that is set to ext4.

Blog post: http://blog.byteonsite.com/?p=10

#!/bin/sh
# ./convert VEID
rsync_options='-aHv'
partition='vz'
if [ ! -e /etc/vz/conf/$1.conf ]; then
echo "Virtual server configuration file: /etc/vz/conf/$1.conf does not exist."
exit 1
fi
if [ -d /$partition/private/$1/root.hdd ]; then
echo "Server already has ploop device"
exit 1
fi
if [ ! -d /$partition/private/$1 ]; then
echo "Server does not exist"
exit 1
fi
# Get disk space in G of current VPS
disk=`vzctl exec $1 df -BG | grep simfs | head -n1 | awk {'print $2'}`
if [ ! $disk ]; then
echo "Could not retrieve disk space figure.  Is VPS running?"
exit 1
fi
# Create and mount file system
mkdir -p /$partition/private/1000$1/root.hdd
if [ ! -d /$partition/private/1000$1/root.hdd ]; then
echo "Unable to create temporary VE_PRIVATE"
exit 1
fi
if ! ploop init -s $disk -t ext4 /$partition/private/1000$1/root.hdd/root.hdd ; then
echo "Unable to create ploop device.  Make sure diskspace is set on VPS."
exit 1
fi
cp /etc/vz/conf/$1.conf /etc/vz/conf/1000$1.conf
if ! vzctl mount 1000$1 ; then
echo "Unable to mount ploop device";
exit 1;
fi
# Rsync over files (sync 1)
rsync $rsync_options /$partition/root/$1/. /$partition/root/1000$1/
# Stop primary, mount, sync final
vzctl stop $1
vzctl mount $1
rsync $rsync_options /$partition/root/$1/. /$partition/root/1000$1/
vzctl umount $1
vzctl umount 1000$1
mv /$partition/private/$1 /$partition/private/$1.backup
mv /$partition/private/1000$1 /$partition/private/$1
vzctl start $1
# Cleanup
rm -f /etc/vz/conf/1000$1.conf
rmdir /vz/root/1000$1
# Verification
verify=`vzlist -H -o status $1`
if [ `vzlist -H -o status $1` = "running" ]; then
echo "Virtual server conversion successful.  Verify manually then run: rm -Rf /$partition/private/$1.backup to remove backup."
else
echo "Server conversion was not successful..Reverting.."
mv -f /$partition/private/$1 /$partition/private/$1.fail
mv /$partition/private/$1.backup /$partition/private/$1
vzctl start $1
fi


http://static.openvz.org/userbars/openvz-user-2.png
ByteOnSite President
Previous Topic: ploop migration with previou sync ?
Next Topic: ploop and secure /tmp
Goto Forum:
  


Current Time: Sat Apr 20 09:34:01 GMT 2024

Total time taken to generate the page: 0.01745 seconds