prepare for master-standby