OpenVZ Forum


Home » General » Support » Live migration with host file system mounted
Live migration with host file system mounted [message #36084] Wed, 20 May 2009 13:36 Go to next message
triangle
Messages: 6
Registered: May 2009
Junior Member
Hi all

I am having an issue with live migrating a container which has mounted a host file system.

Environment:

This is the OpenVZ linux kernel I am using: 2.6.18-92.1.18.el5.028stab060.8

And here are my action scripts:

[root@openvz-cluster-node1 vz-scripts]# cat 101.mount
#!/bin/bash

CONTAINER_ID=101
MOUNT_POINT="/vz/root/${CONTAINER_ID}/mnt"

mount -n --bind /drbd1 ${MOUNT_POINT}

[root@openvz-cluster-node1 vz-scripts]# cat 101.umount
#!/bin/bash

CONTAINER_ID=101
MOUNT_POINT="/vz/root/${CONTAINER_ID}/mnt"

mnt=$(grep ${MOUNT_POINT} /proc/mounts | wc -l)

if [ ${mnt} -eq 1 ]; then
umount ${MOUNT_POINT}
fi
[root@openvz-cluster-node1 vz-scripts]#

Problem description:

*Non-live* migration works perfectly while the migrated container has mounted its host's file system. Unfortunately, *live* migration fails in this setup.

Here is an example:

Live migration:

[root@openvz-cluster-node1 ~]# vzmigrate --remove-area no --online openvz-cluster-node2 101
OPT:--remove-area
OPT:--online
OPT:openvz-cluster-node2
Starting online migration of CT 101 to openvz-cluster-node2
Preparing remote node
Initializing remote quota
vzquota : (warning) Quota file exists, it will be overwritten
Syncing private
Live migrating container...
Error: Failed to suspend container

And now non-live migration:

[root@openvz-cluster-node1 ~]# vzmigrate --remove-area no openvz-cluster-node2 101
OPT:--remove-area
OPT:openvz-cluster-node2
Starting migration of CT 101 to openvz-cluster-node2
Preparing remote node
Initializing remote quota
Syncing private
Stopping container
Syncing 2nd level quota
Starting container
Cleanup

BTW: Live migration works perfectly without having any host file system(s) mounted by the container.

My goal is to have live migration working as smooth and transparently as non-live migration even if the migrated container has mounted a host file system.

Is this possible? How can this be achieved?

Thanks, David
Re: Live migration with host file system mounted [message #38196 is a reply to message #36084] Fri, 27 November 2009 14:24 Go to previous messageGo to next message
yourweb is currently offline  yourweb
Messages: 6
Registered: November 2009
Junior Member
I have the same question, any update on this??
Re: Live migration with host file system mounted [message #38197 is a reply to message #38196] Fri, 27 November 2009 14:34 Go to previous messageGo to next message
triangle
Messages: 6
Registered: May 2009
Junior Member
No, unfortunately, I have no additional information regarding this issue.

Regards, David
Re: Live migration with host file system mounted [message #38198 is a reply to message #38197] Fri, 27 November 2009 14:40 Go to previous messageGo to next message
yourweb is currently offline  yourweb
Messages: 6
Registered: November 2009
Junior Member
triangle wrote on Fri, 27 November 2009 09:34
No, unfortunately, I have no additional information regarding this issue.

Regards, David

I've found something: ]url]http://wiki.openvz.org/Checkpointing_and_live_migration[/url]

With some custom scripts you can use this on your node.
Re: Live migration with host file system mounted [message #38221 is a reply to message #38198] Mon, 30 November 2009 09:55 Go to previous messageGo to next message
triangle
Messages: 6
Registered: May 2009
Junior Member
This is what I am actually doing to live migrate such a container:

vzctl exec 101 umount /data && vzmigrate --remove-area no --online <OpenVZ destination host> 101

Kind regards, David
Re: Live migration with host file system mounted [message #38222 is a reply to message #38221] Mon, 30 November 2009 10:50 Go to previous message
yourweb is currently offline  yourweb
Messages: 6
Registered: November 2009
Junior Member
triangle wrote on Mon, 30 November 2009 04:55
This is what I am actually doing to live migrate such a container:

vzctl exec 101 umount /data && vzmigrate --remove-area no --online <OpenVZ destination host> 101

Kind regards, David

You umount the disk, transfer the container and the disk is mounted again, correct me if I'm wrong? Seems to be a better solution than saving the RAM into a file and restoring it manually as this tool does do this for me.
Previous Topic: Elastix on OpenVZ, I cant to do the bridge
Next Topic: Enable syn cookies on VE
Goto Forum:
  


Current Time: Wed Jul 24 02:32:53 GMT 2024

Total time taken to generate the page: 0.02435 seconds