Blog |Follow Nick on Twitter| About

I've spent far too long googling how to disable fencing.... I can only guess that because you shouldn't really disable fencing no-one wants to post a how to... so for the hard of hearing.

Do NOT disable fencing on your RedHat Cluster unless you really know what you're doing! Fencing is designed to protect your data from corruption, if you disable fencing your data is at RISK, you have been warned!

I however am working on building a GFS DRBD cluster, as far as I can gather DRBD doesn't need fencing, and the bottom line is my data is personal data not mission critical and if my website goes down due to my disabling fencing then it's no big deal.

Rant over, here we go..... To disable fencing, create a custom fence agent.

Fence agents are simply scripts in /sbin, I've created /sbin/myfence and here are the contents.

echo "success: myfence $2"
exit 0

Next, change your cluster.conf...

If you're running SELINUX don't forget to update that! ... start with restorecon /sbin/myfence then update your policy.

This is the policy I've created...

module fenced 1.0;

require {
        type fenced_t;
        type shell_exec_t;
        class file { read execute };

#============= fenced_t ==============
allow fenced_t shell_exec_t:file { read execute };

If you save the above as fenced.te, then run this to install it..

checkmodule -M -m -o fenced.mod fenced.te
semodule_package -o fenced.pp -m fenced.mod
semodule -i fenced.pp

You should now be able to start cman, fencing will start but will return success for any fencing issues without actually doing anything!

Happy non-fencing!


Nick Bettison ©