[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [Xen-users] Xen-DRBD Migration question
Eric Laflamme sent a missive on 2010-08-10: > Hi, > > Let me introduce our setup so you can have a better ideas on my > situation. > > We have 2 physical hosts. Both have Xen for the vm and as for the > disk, we have DRBD that sync between the two host. We would like to be > able to do migration or live migration between host. This is possible > as we have successfully done it. > > As we can read on documentation and all is that migration and live > migration is done with --allow-two-primaries options on DRBD. > Unfortunately and for obvious reasons this option is too dangerous to > be left on and we would like to avoid using this at all cost. > > I've heard from a post somewhere that a migration Secondary-Primary > can be done. Our best way to do this will be to put de VM on pause. > Put the drbd disk on Secondary. Then migrate the vm to the second > host, then put the drbd disk on second host to primary and unpause the > vm. I've searched on google and I can't find anything on this method. > > Is there a way to do this? Is there another way you are thinking of? > > Thanks for you help, I think that doing a live migration is very simple with DRBD and that provided you're not attempting to write to the same drbd resource from both machines at the same time I _think_ you'll be fine. I've live migrated back and forth between hosts with no problem using drbd storage in primary/primary mode. I allocate a drbd resource for each domU. I also have duplicated the config for the domU's between hosts so that I can fail-over if one of the hosts fails. It would be possible for you to write a little shell script that does the following if you didn't want to do it manually: Parses the config file of the domU for the drbd resource and then logs into the destination host and brings the required drbd resource from secondary to primary, then issues the live migration command to move the domU to the destination host. It would then need to check that the domU has moved to the other machine by looking at the say the output of xm list (depends on how you are managing the domU's) and then once the domU has moved over to then take the drbd resource on the originating host to secondary. To do this with a paused domain requires that you copy between the hosts the state file that is created when you pause the domain - but I've not done this so I am not 100% sure as to if this actually works or what the pitfalls are. HTH Simon. _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |