DRBD Not syncing between my nodes
You actually did not need to run sudo drbdadm -- --overwrite-data-of-peer primary all
AS long as /dev/drbdYou should have done the following
Step01) sudo service mysql stop
on DRBD Primary so additional changes are not piled for DRBD to sync
Step02) sudo drbdadm connect all
on DRBD Secondary
Step03) sudo cat /proc/drbd
on DRBD Secondary to make sure the connection stats is WFConnection
Step04) sudo drbdadm connect all
on DRBD Primary
Step05) sudo cat /proc/drbd
on DRBD Primary to make sure the connection state is SyncTarget
.
Step06) sudo service mysql stop
on DRBD Primary so MySQL can get back up. The sync will continue. You do not have to wait for DRBD to be fully sync'd in Step 05.
CAVEAT
DRBD should not be used over a geographic distance. I work with setups that have DRBD pairs connect via CrossOver Cables over 192.168.x.x..
Try following:
On primary node
drbdadm connect all
On secondary node
drbdadm -- --discard-my-data connect all