Hello.

Those script are done to manage you drbd cluster without pain.
I hope it will work for you.

At install time, the drbd and datadisk script will be installed
and then linked in the /etc/(rc.d)/init.d directory.

You will have to type :

On RedHat (based) distribution(s):
> chkconfig drbd on
> chkconfig datadisk on

On Debian (based) distribution(s):
> update-rc.d drbd start 18 2 3 4 5 . stop 18 0 1 6 . 
> update-rc.d drbd start 19 2 3 4 5 . stop 19 0 1 6 . 

to have it start at boot time automaticly.

You will need to add something like this to your /etc/fstab too :
/dev/nb0 /mnt/drbd ext2 rw,sync,nouser,suid,exec,nodev,noauto 1 0

The key values being :
- sync   : do not cache the read
- noauto : do not mount the partition at boot time (done by datadisk)



drbdc is a administration script. see drbdc help for the list
of available command.

datadisk is the script which will setup the node function.
It can be used through heartbeart or like a standalone
"service starter".

It now accept three starting mode to please everyone:

 - Force

   FORCE IS THE MODE TO USE WITH HEARTBEAT.
   DO NOT USE ANY OTHER MODE

   this mode will try to initialise the mode as master.
   If the remote mode is already primary, it will wait
   for it a maximum of GLOBAL_TIME which can be set in
   the configuration file

 - Restore

   This mode will restore the node in the same state
   than before the reboot.
   The first state have to be set using drbdc

 - Negotiate

   The node will become master if the other node is secondary
   The node Will become slave the other node is primary

Check the sample example file for more information.

Thomas
