[Pacemaker] crm_resource problem

Dan Urist durist at ucar.edu
Mon Aug 17 18:45:13 EDT 2009


Dejan Muhamedagic wrote:
> 
> Why did you use a custom script and not the crm shell? BTW, the
> crm shell is also scriptable.

I'm managing four 2-node clusters which each run similar services (one
or more linux vservers on top of drbd-lvm volumes). It's much cleaner
and clearer for me to keep each logical piece of configuration along
with its constraints in its own XML file (with comments!). So I have one
file for each of my DRBD/LVM volumes, containing the DRBD master/slave
resource and a group consisting of the LVM volume and a MailTo resource
for notification; then one file for each of my vservers, which contains
a group of the vserver with its requirements plus a constraint on the
relevant DRBD/LVM volume. Then I have a couple of other XML files that
contain configuration that's common to all four clusters (a working
hours constraint, a ping constraint, stonith config, etc).

I have simple templates (perl Template Toolkit) to create these XML
files, and they're all kept on an NFS filesystem which is mounted to
each cluster node, so I can easily copy files around as needed.

The master script merges these chunks and replaces the relevant parts of
the CIB. I'd be happy to share it, if there's an interest.

I like the crm shell, but for me it's much easier to see what's going on
when services are logically broken out like this and it's easier to
manage four similar clusters consistently.

-- 
Dan Urist
durist at ucar.edu
303-497-2459 (office)
303-961-2675 (cell)




More information about the Pacemaker mailing list