DRBD Command

[root@server1 ~]# drbdadm -- disconnect all
[root@server1 ~]# drbdadm -- connect all
[root@server2 ~]# drbdadm -- disconnect all
[root@server2 ~]# drbdadm -- connect all

or

## node at old/bad drbd data
[root@server2 ~]# drbdadm -- disconnect all
[root@server2 ~]# drbdadm -- --discard-my-data connect all
## node at the latest/good drbd data
[root@server1 ~]# drbdadm connect all

If you found the problem between primary and secondary server:
cs:WFConnection st:Primary/Unknown ds:UpToDate/DUnknown C r---
cs:StandAlone st:Secondary/Unknown ds:UpToDate/DUnknown r---

It can help to fix the "Unknown problem". The nodes will start to resynchronize, transferring data from the good-data node (will appears as SyncSource in /proc/drbd) to the bad-data node(SyncTarget).

[root@primary ~]# drbdsetup primary all

or

[root@primary ~]# drbdsetup /dev/drbd0 primary -o

Make the primary drbd to current server

drbdadm -- --clear-bitmap new-current-uuid all

If you found : Secondary/Secondary and Inconsistent/Inconsistent, as any freshly initialized DRBD device.

[root@secondary ~]# drbdsetup secondary all

or

[root@secondary ~]# drbdsetup /dev/drbd0 secondary

Make the secondary drbd to current server

[root@primary ~]# drbdadm connect all

Connect all drbd resource manually
You can use it if you have secondary server waiting to join.



Server is hosted by Alanstudio
Linux Operating System

Recommend screen resolution 1024 x 768 / IE / FireFox
Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved.