'\" t
.\" Title: ocf_heartbeat_mpathpersist
.\" Author: ClusterLabs contributors (see the resource agent source for information about individual authors)
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 06/27/2020
.\" Manual: OCF resource agents
.\" Source: resource-agents UNKNOWN
.\" Language: English
.\"
.TH "OCF_HEARTBEAT_MPATHP" "7" "06/27/2020" "resource-agents UNKNOWN" "OCF resource agents"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ocf_heartbeat_mpathpersist \- Manages SCSI persistent reservations on multipath devices
.SH "SYNOPSIS"
.HP \w'\fBmpathpersist\fR\ 'u
\fBmpathpersist\fR [start | stop | monitor | promote | demote | meta\-data | validate\-all]
.SH "DESCRIPTION"
.PP
This resource agent manages SCSI persistent reservations on multipath devices\&. "mpathpersist" from multipath\-tools is used, please see its documentation\&. Should be used as multistate (Master/Slave) resource Slave registers its node id ("crm_node \-i") as reservation key ( \-\-param\-sark ) on each device in the params "devs" list\&. Master reservs all devices from params "devs" list with reservation "\-\-prout\-type" value from "reservation_type" parameter\&. Please see man sg_persist(8) and mpathpersist(8) for reservation_type details\&.
.SH "SUPPORTED PARAMETERS"
.PP
\fBbinary\fR
.RS 4
The name of the binary that manages the resource\&.
.sp
(optional, string, default "mpathpersist")
.RE
.PP
\fBdevs\fR
.RS 4
Device list\&. Multiple devices can be listed with blank space as separator\&. Shell wildcars are allowed\&.
.sp
(required, string, no default)
.RE
.PP
\fBrequired_devs_no\fR
.RS 4
Minimum number of "working" devices from device list 1) existing 2) "mpathpersist \-\-in \-\-read\-keys " works (Return code 0) resource actions "start","monitor","promote" and "validate\-all" return "OCF_ERR_INSTALLED" if the actual number of "working" devices is less than "required_devs_no"\&. resource actions "stop" and "demote" tries to remove reservations and registration keys from all working devices, but always return "OCF_SUCCESS"
.sp
(optional, string, default "1")
.RE
.PP
\fBreservation_type\fR
.RS 4
reservation type
.sp
(optional, string, default "1")
.RE
.PP
\fBmaster_score_base\fR
.RS 4
master_score_base value "master_score_base" value is used in "master_score" calculation: master_score = master_score_base + master_score_dev_factor * working_devs if set to bigger value in mpathpersist resource configuration on some node, this node will be "preferred" for master role\&.
.sp
(optional, string, default "0")
.RE
.PP
\fBmaster_score_dev_factor\fR
.RS 4
Working device factor in master_score calculation each "working" device provides additional value to "master_score", so the node that sees more devices will be preferred for the "Master"\-role Setting it to 0 will disable this behavior\&.
.sp
(optional, string, default "100")
.RE
.PP
\fBmaster_score_delay\fR
.RS 4
master/slave decreases/increases its master_score after delay of "master_score_delay" seconds so if some device gets inaccessible, the slave decreases its master_score first and the resource will no be watched and after this device reappears again the master increases its master_score first this can work only if the master_score_delay is bigger then monitor interval on both master and slave Setting it to 0 will disable this behavior\&.
.sp
(optional, string, default "30")
.RE
.SH "SUPPORTED ACTIONS"
.PP
This resource agent supports the following actions (operations):
.PP
\fBstart\fR
.RS 4
Starts the resource\&. Suggested minimum timeout: 30s\&.
.RE
.PP
\fBpromote\fR
.RS 4
Promotes the resource to the Master role\&. Suggested minimum timeout: 30s\&.
.RE
.PP
\fBdemote\fR
.RS 4
Demotes the resource to the Slave role\&. Suggested minimum timeout: 30s\&.
.RE
.PP
\fBnotify\fR
.RS 4
Suggested minimum timeout: 30s\&.
.RE
.PP
\fBstop\fR
.RS 4
Stops the resource\&. Suggested minimum timeout: 30s\&.
.RE
.PP
\fBmonitor (Slave role)\fR
.RS 4
Performs a detailed status check\&. Suggested minimum timeout: 20s\&. Suggested interval: 29s\&.
.RE
.PP
\fBmonitor (Master role)\fR
.RS 4
Performs a detailed status check\&. Suggested minimum timeout: 20s\&. Suggested interval: 60s\&.
.RE
.PP
\fBmeta\-data\fR
.RS 4
Retrieves resource agent metadata (internal use only)\&. Suggested minimum timeout: 5s\&.
.RE
.PP
\fBvalidate\-all\fR
.RS 4
Performs a validation of the resource configuration\&. Suggested minimum timeout: 30s\&.
.RE
.SH "EXAMPLE CRM SHELL"
.PP
The following is an example configuration for a mpathpersist resource using the
\fBcrm\fR(8)
shell:
.sp
.if n \{\
.RS 4
.\}
.nf
primitive p_mpathpersist ocf:heartbeat:mpathpersist \e
params \e
devs=\fIstring\fR \e
op monitor depth="0" timeout="20s" interval="29s" role="Slave" \e
op monitor depth="0" timeout="20s" interval="60s" role="Master"
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
ms ms_mpathpersist p_mpathpersist \e
meta notify="true" interleave="true"
.fi
.if n \{\
.RE
.\}
.SH "EXAMPLE PCS"
.PP
The following is an example configuration for a mpathpersist resource using
\fBpcs\fR(8)
.sp
.if n \{\
.RS 4
.\}
.nf
pcs resource create p_mpathpersist ocf:heartbeat:mpathpersist \e
devs=\fIstring\fR \e
op monitor depth="0" timeout="20s" interval="29s" role="Slave" \e
op monitor depth="0" timeout="20s" interval="60s" role="Master" \-\-master
.fi
.if n \{\
.RE
.\}
.SH "SEE ALSO"
.PP
\m[blue]\fB\%http://clusterlabs.org/\fR\m[]
.SH "AUTHOR"
.PP
\fBClusterLabs contributors (see the resource agent source for information about individual authors)\fR