1OCF_HEARTBEAT_SG_PER(7)       OCF resource agents      OCF_HEARTBEAT_SG_PER(7)
2
3
4

NAME

6       ocf_heartbeat_sg_persist - Manages SCSI PERSISTENT RESERVATIONS
7

SYNOPSIS

9       sg_persist [start | stop | monitor | promote | demote | meta-data |
10                  validate-all]
11

DESCRIPTION

13       This resource agent manages SCSI PERSISTENT RESERVATIONS. "sg_persist"
14       from sg3_utils is used, please see its documentation. Should be used as
15       multistate (Master/Slave) resource Slave registers its node id
16       ("crm_node -i") as reservation key ( --param-rk ) on each device in the
17       "devs" list. Master reservs all devices from "devs" list with
18       reservation "--prout-type" value from "reservation_type" parameter.
19

SUPPORTED PARAMETERS

21       binary
22           The name of the binary that manages the resource.
23
24           (optional, string, default "sg_persist")
25
26       devs
27           Device list. Multiple devices can be listed with blank space as
28           separator. Shell wildcars are allowed.
29
30           (required, string, no default)
31
32       required_devs_nof
33           Minimum number of "working" devices from device list 1) existing 2)
34           "sg_persist --read-keys $device" works (Return code 0) resource
35           actions "start","monitor","promote" and "validate-all" return
36           "$OCF_ERR_INSTALLED" if the actual number of "working" devices is
37           less then "required_devs_nof". resource actions "stop" and "demote"
38           tries to remove reservations and registration keys from all working
39           devices, but always return "$OCF_SUCCESS"
40
41           (optional, string, default "1")
42
43       reservation_type
44           reservation type
45
46           (optional, string, default "1")
47
48       master_score_base
49           master_score_base value "master_score_base" value is used in
50           "master_score" calculation: master_score = $master_score_base +
51           $master_score_dev_factor * $working_devs if set to bigger value in
52           sg_persist resource configuration on some node, this node will be
53           "preferred" for master role.
54
55           (optional, string, default "0")
56
57       master_score_dev_factor
58           Working device factor in master_score calculation each "working"
59           device provides additional value to "master_score", so the node
60           that sees more devices will be preferred for the "Master"-role
61           Setting it to 0 will disable this behavior.
62
63           (optional, string, default "100")
64
65       master_score_delay
66           master/slave decreases/increases its master_score after delay of
67           $master_score_delay seconds so if some device gets inaccessible,
68           the slave decreases its master_score first and the resource will no
69           be watched and after this device reappears again the master
70           increases its master_score first this can work only if the
71           master_score_delay is bigger then monitor interval on both master
72           and slave Setting it to 0 will disable this behavior.
73
74           (optional, string, default "30")
75

SUPPORTED ACTIONS

77       This resource agent supports the following actions (operations):
78
79       start
80           Starts the resource. Suggested minimum timeout: 30s.
81
82       promote
83           Promotes the resource to the Master role. Suggested minimum
84           timeout: 30s.
85
86       demote
87           Demotes the resource to the Slave role. Suggested minimum timeout:
88           30s.
89
90       notify
91           Suggested minimum timeout: 30s.
92
93       stop
94           Stops the resource. Suggested minimum timeout: 30s.
95
96       monitor (Slave role)
97           Performs a detailed status check. Suggested minimum timeout: 20s.
98           Suggested interval: 29s.
99
100       monitor (Master role)
101           Performs a detailed status check. Suggested minimum timeout: 20s.
102           Suggested interval: 60s.
103
104       meta-data
105           Retrieves resource agent metadata (internal use only). Suggested
106           minimum timeout: 5s.
107
108       validate-all
109           Performs a validation of the resource configuration. Suggested
110           minimum timeout: 30s.
111

EXAMPLE CRM SHELL

113       The following is an example configuration for a sg_persist resource
114       using the crm(8) shell:
115
116           primitive p_sg_persist ocf:heartbeat:sg_persist \
117             params \
118               devs=string \
119             op monitor depth="0" timeout="20s" interval="29s" role="Slave" \
120             op monitor depth="0" timeout="20s" interval="60s" role="Master"
121
122           ms ms_sg_persist p_sg_persist \
123             meta notify="true" interleave="true"
124

EXAMPLE PCS

126       The following is an example configuration for a sg_persist resource
127       using pcs(8)
128
129           pcs resource create p_sg_persist ocf:heartbeat:sg_persist \
130             devs=string \
131             op monitor depth="0" timeout="20s" interval="29s" role="Slave" \
132             op monitor depth="0" timeout="20s" interval="60s" role="Master" --master
133

SEE ALSO

135       http://clusterlabs.org/
136

AUTHOR

138       ClusterLabs contributors (see the resource agent source for information
139       about individual authors)
140
141
142
143resource-agents UNKNOWN           03/15/2019           OCF_HEARTBEAT_SG_PER(7)
Impressum