Where can I specify environment variables for a db2 resource in a Pacemaker cluster?

Solution Verified - Updated -


  • The DB2 instance user's environment variables are loaded when I start the database manually, but they're not set when Pacemaker starts the database via an ocf:heartbeat:db2 resource.
  • The environment variables are configured in .profile in the DB2 user's home directory, but they are not taking effect when Pacemaker starts the resource.


  • Red Hat Enterprise Linux 7 or 8 (with the High Availability Add-on)
  • IBM DB2 managed by ocf:heartbeat:db2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content