A simple and fast question about pcs. With this command

pcs resource create NameService named op monitor interval=30s

I create a resource named,wich is working,but if i want to run named -u named -t /var/chroot instead of default named,how to create a resource with those options?

1 Answer 1


You can give the named resource agent a user via 'named_user', and you can pass other options via 'named_options':

pcs resource create NameService named named_user=named \ named_options="-t /var/chroot" op monitor interval=30s

Or you could try using the "anything" resource agent to feed options to named. It would look something like this:

pcs resource create NameService ocf:heartbeat:anything \ binfile="/usr/sbin/named" cmdline_options="-u named -t /var/chroot" \ pidfile="/var/run/named.pid" op monitor interval=30s

EDIT: For more resource agent options:

# pcs resource describe ocf:heartbeat:named

  • Thanks,also using the syntax systemd:heartbeat works,but thanks for answer
    – elbarna
    Apr 18, 2016 at 17:33
  • setting a resource to manage systemd:heartbeat will mean that Pacemaker will try to start/stop/monitor the heartbeat systemd unit, which you really wouldn't want to do :-P Apr 18, 2016 at 17:37
  • Whoops,I meant systemd:named,i little error sorry
    – elbarna
    Apr 18, 2016 at 17:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .