How do I configure fence_brocade in a RHEL Pacemaker cluster?
Environment
- Red Hat Enterprise Linux 6, 7, 8, or 9 (with the High Availability Add-on)
- Pacemaker
fence_brocade
Issue
- What options do I need to specify to configure a stonith device using the
fence_brocadefence agent?
Resolution
Test the ability to query a node's status
The -o status command described below will test the specified fence_brocade options. This will not reboot a node or revoke its access to storage.
# fence_brocade -o status --ip=<FC switch IP> --username=<username> --password=<password> --plug=<port> [--command-prompt=<command_prompt>] [--ssh]
The --plug option specifies the port on the switch for the node whose status is being queried.
The --command-prompt option allows the user to specify a custom command prompt. The agent expects "> " by default.
The --ssh option enables SSH. The agent uses telnet by default.
A full list of options can be obtained by running fence_brocade --help.
Test the ability to revoke a node's access to shared storage
After a successful test with the -o status option, use the -o off and -o on options to test revoking a node's access to shared storage.
# fence_brocade -o off --ip=<FC switch IP> --login=<username> --password=<password> --plug=<port> [--command-prompt=<command_prompt>] [--ssh]
# fence_brocade -o on --ip=<FC switch IP> --login=<username> --password=<password> --plug=<port> [--command-prompt=<command_prompt>] [--ssh]
Create a fence_brocade stonith device
After verifying that the off and on actions work, configure a stonith device so that the cluster can use fence_brocade to fence an unhealthy node.
# pcs stonith create br_fence fence_brocade ip=<FC switch IP> login=<login name> passwd=<password> pcmk_host_map='<node1_name>:<node1_port>;<node2_name>:<node2_port>' [cmd_prompt=<command_prompt>] [secure=1] pcmk_reboot_action=off meta provides unfencing
A full list of options can be obtained by running pcs stonith describe fence_brocade.
The format for pcmk_host_map is explained in the following article:
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.