DRBD secondary to primary:

drbdadm disconnect all

drbdadm primary r0 --force

mount /dev/drbd0 /mnt

[drbdadm connect r0] to wait old primary restore

 

 

Old primary to slave:

 

Then restore drbdadm primary r0, sendone is drbdadm secondary r0

 

drbdadm disconnect r0

 

umount /mnt

 

drbdadm secondary r0

 

drbdadm -- --discard-my-data connect r0