Symptom:
(public)
Problem:
(public)

Scenario: You have an Aventurin{e} Cluster and for one reason or another you want to revert which one is primary and which one is secondary.

This requires some actions from the command line as "root" on both nodes.

WARNING: ONLY do this if "cat /proc/drbd" (or the Clustering info in the GUI) reports the node status as "Primary/Secondary" and/or "Secondary/Primary". If it shows one "Unknown", DON'T DO THIS!!!

Solution:
(public)

Let us assume your servers are named like this: 

server1 = primary
server2 = secondary

You want to make server2 the default primary and it should carry the load.

1.) On server1 execute the following commands: 

/etc/init.d/heartbeat stop
/sbin/drbdadm secondary vz

2.) On server2 execute the following commands:

/sbin/drbdadm primary vz

3.) On server1 execute the following commands:

/etc/init.d/heartbeat start

4.) On server2 execute the following commands:

/etc/init.d/heartbeat reload

Give it like 60-90 seconds to kick in. Then check with this commands on both nodes:

cat /proc/drbd
vzlist -a


"cat /proc/drbd" should now report "Primary/Secondary" on server2 and "Secondary/Primary" on server1.

Additionally "vzlist -a" should show the VPS either starting or running on server2.