Puppet module for DRBD
Puppet
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
manifests
templates
LICENSE
README

README

- Written by Wolfgang Miedl <wmiedl@zid.tuwien.ac.at>

= Description

Installs and manages drbd on a host.

Note: This class will *never* start/stop the drbd demon.

See drbd::drbd for main class configuration

IMPORTANT NOTICE REGARDING DATA SAFETY AND THIS CLASS:
The configuration created by this class's default values assumes a hardware RAID 
controller with a battery/flash backed write cache. 

To safely run on hardware that are not equiped with a battery/flash backed write 
cache, for example software RAID on SATA disks, you MUST set the class parameter
$disable_disk_flush to false. Otherwise the configuration will disable, amongst 
other features, write barriers and meta-data flushes, which can lead to file system
corruption and (potentially total) dataloss.

Please also be advised that the author didn't invest particulary much time 
investigating DRBD-options for hardware without backed write cache, simply because
its not a use-case he often has to deal with. As such there may be beneficial options
that are not generated by this module available; please consult the DRBD reference 
manual for this.

= License

This work is licensed under the Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) 
license. A full copy of the license terms can be found in the file LICENSE.

By using, modifying or redistributing this work you agree to be bound by the 
license terms. 

= Requirements 

None

= Example

This example will configure the following setup:

1) It will install drbd userland tools
2) It will setup drbd to disable barriers and md-flushes (because it runs on boxes
   with battery backed cache)
3) It will integrate into pacemaker for resource level fencing 
   (See http://www.drbd.org/users-guide/s-pacemaker-fencing.html)
4) It will define a single resource named 'pxe' on the nodes mnemosyne and moneta;
   the structs should be pretty self-explanatory, but further info is available
   in the drbd::resource in-manifest documentation

class {'drbd':
	shared_secret => '<changeme>',
	sync_rate => '80M',
	pacemaker_integration => true,
}

$node_mnemosyne = {
   host => 'mnemosyne',
   disk => '/dev/Data/pxe',
   ip => 10.10.10.10,
   port => '7788',
   meta_disk => '/dev/Data/pxe-meta [0]',
}

$node_moneta = {
   host => 'moneta',
   disk => '/dev/Data/pxe',
   ip => 10.10.10.20,
   port => '7788',
   meta_disk => '/dev/Data/pxe-meta [0]',
}

drbd::resource{'pxe':
    device => '/dev/drbd0',
    host_a => $node_mnemosyne,
    host_b => $node_moneta,
}