OCF_HEARTBEAT_MPATHP(7)
β¨ ocf_heartbeat_mpathpersist β¨
okay bestie, so this is a page from the OCF resource agents manual set, and today's main character is ocf_heartbeat_mpathpersist(7). Buckle up, we're managing SCSI persistent reservations on multipath devices π
πΈ NAME πΈ
ocf_heartbeat_mpathpersist β literally manages SCSI persistent reservations on multipath devices. that's the whole vibe. no cap.
π¦ SYNOPSIS π¦
mpathpersist [start | stop | monitor | promote | demote | meta-data |
validate-all]
π DESCRIPTION π
so this resource agent manages SCSI persistent reservations on multipath devices. it uses "mpathpersist" from multipath-tools, so go read that documentation too, iykyk.
it should be used as a multistate (Promotable) resource. periodt.
When it's Unpromoted, it registers its node id ("crm_node -i") as the reservation key (--param-sark) on each device in the params "devs" list. When it's Promoted, it reserves all the devices from the params "devs" list using the reservation "--prout-type" value from the "reservation_type" parameter. pls go see sg_persist(8) and mpathpersist(8) for the details on reservation_type, they explain it way better than I could π«Ά
π SUPPORTED PARAMETERS π
binaryβ the name of the binary that manages the resource.
(optional, string, default "mpathpersist")
devsβ the device list, bestie. multiple devices can be listed with blank space as separator, and shell wildcards are allowed β¨
(required, string, no default)
required_devs_noβ the minimum number of "working" devices from the device list. a device counts as "working" if 1) it exists and 2)"mpathpersist --in --read-keys <device>"works (return code 0).
for the resource actions "start", "monitor", "promote" and "validate-all", they return "OCF_ERR_INSTALLED" if the actual number of "working" devices is less than "required_devs_no".
for resource actions "stop" and "demote", they try to remove reservations and registration keys from all working devices, but they always return "OCF_SUCCESS".
(optional, string, default "1")
reservation_typeβ reservation type. that's it, that's the description π
(optional, string, default "1")
master_score_baseβ the"master_score_base"value, and it's used in the"master_score"calculation:master_score = master_score_base + master_score_dev_factor * working_devs. if you set a bigger value in the mpathpersist resource configuration on some node, that node becomes "preferred" for the promoted role π
(optional, string, default "0")
master_score_dev_factorβ the working device factor in the promoted calculation. each "working" device provides additional value to"master_score", so the node that sees more devices gets preferred for the"Promoted"-role. setting it to0disables this behavior.
(optional, string, default "100")
master_score_delayβ promoted/unpromoted decreases/increases itsmaster_scoreafter a delay of"master_score_delay"seconds. so if some device gets inaccessible, the unpromoted decreases its promoted first and the resource will no be watched, and after this device reappears again the promoted increases itsmaster_scorefirst. this can work only if themaster_score_delayis bigger then monitor interval on both promoted and unpromoted. setting it to0disables this behavior.
(optional, string, default "30")
π₯ SUPPORTED ACTIONS π₯
this resource agent supports the following actions (operations):
startβ starts the resource. suggested minimum timeout:30s.promoteβ promotes the resource to the Master role. suggested minimum timeout:30s.demoteβ demotes the resource to the Slave role. suggested minimum timeout:30s.notifyβ suggested minimum timeout:30s.stopβ stops the resource. suggested minimum timeout:30s.monitor(Unpromoted role) β performs a detailed status check. suggested minimum timeout:20s. suggested interval:29s.monitor(Promoted role) β performs a detailed status check. suggested minimum timeout:20s. suggested interval:60s.meta-dataβ retrieves resource agent metadata (internal use only). suggested minimum timeout:5s.validate-allβ performs a validation of the resource configuration. suggested minimum timeout:30s.
π EXAMPLE CRM SHELL π
here's an example configuration for a mpathpersist resource using the crm(8) shell:
primitive p_mpathpersist ocf:heartbeat:mpathpersist \
params \
devs=string \
op monitor depth="0" timeout="20s" interval="29s" role="Unpromoted" \
op monitor depth="0" timeout="20s" interval="60s" role="Promoted"
ms ms_mpathpersist p_mpathpersist \
meta notify="true" interleave="true"
π EXAMPLE PCS π
and here's the same kind of thing for a mpathpersist resource using pcs(8):
pcs resource create p_mpathpersist ocf:heartbeat:mpathpersist \
devs=string \
op monitor OCF_CHECK_LEVEL="0" timeout="20s" interval="29s" role="Unpromoted" \
op monitor OCF_CHECK_LEVEL="0" timeout="20s" interval="60s" role="Promoted" promotable
β SEE ALSO β
http://clusterlabs.org/ β go click, bestie π¦
π AUTHOR π
ClusterLabs contributors (see the resource agent source for information about individual authors)
ngl this page is from resource-agents UNKNOWN, dated 10/01/2026 β and that's the whole manual, you ate that π β¨
π¦ where this page comes from
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms