1CRM_RESOURCE(8)      Heartbeat 2.0.8 Administration Guide      CRM_RESOURCE(8)
2
3
4

NAME

6       crm_resource - Interact with the Cluster Resource Manager
7

SYNOPSIS

9       crm_resource [-?VS] -(L|Q|W|D|C|P|p) [options]
10

DESCRIPTION

12       crm_resource  allow  resources to be listed, started, stopped, migrated
13       and so forth.
14
15       --help, -?
16               this help message
17
18       --verbose, -V
19               turn on debug info. additional instances increase verbosity
20
21       --quiet, -Q
22               Print only the value on stdout (for use with -W)
23
24   COMMANDS
25       --list, -L
26               List all resources
27
28       --query-xml, -x
29               Query a resource.
30
31               Requires: -r
32
33       --locate, -W
34               Locate a resource.
35
36               Requires: -r
37
38       --migrate, -M
39               Migrate a resource from it current location.
40
41               Use -H to specify a destination.  If -H is  not  specified,  we
42               will force the resource to move by creating a rule for the cur‐
43               rent location and a score of -INFINITY
44
45               NOTE: This will prevent the resource from running on this  node
46               until the constraint is removed with -U
47
48               Requires: -r, Optional: -H, -f
49
50       --un-migrate, -U
51               Remove all constraints created by -M
52
53               Requires: -r
54
55       --delete, -D
56               Delete a resource from the CIB.
57
58               Requires: -r, -t
59
60       --cleanup, -C
61               Delete a resource from the LRM.
62
63               Requires: -r.  Optional: -H
64
65       --reprobe, -P
66               Recheck for resources started outside of the CRM.
67
68               Optional: -H
69
70       --refresh, -R
71               Refresh the CIB from the LRM.
72
73               Optional: -H
74
75       --set-parameter string, -p string
76               Set the named parameter for a resource.
77
78               Requires: -r, -v.  Optional: -i, -s
79
80       --get-parameter string, -g string
81               Get the named parameter for a resource.
82
83               Requires: -r.  Optional: -i, -s
84
85       --delete-parameter string, -d string
86               Delete the named parameter for a resource.
87
88               Requires: -r.  Optional: -i
89
90       --get-property string, -G string
91               Get   the  named  property  (eg.  class,  type,  is_managed)  a
92               resource.
93
94               Requires: -r
95
96       --set-property string, -S string
97               Set the named property (not parameter) for a resource.
98
99               Requires: -r, -t, -v
100
101   OPTIONS
102       --resource string, -r string
103               Resource ID
104
105       --resource-type string, -t string
106               Resource type (primitive, clone, group, ...)
107
108       --property-value string, -v string
109               Property value
110
111       --host-uname string, -H string
112               Host name
113
114       --force-relocation, -f
115               Force the resource to move by creating a rule for  the  current
116               location and a score of -INFINITY
117
118               This should be used if the resource's stickiness and constraint
119               scores total more than INFINITY (Currently 10,000)
120
121               NOTE: This will prevent the resource from running on this  node
122               until the constraint is removed with -U
123
124       -s string
125               (Advanced  Use  Only)  ID  of the instance_attributes object to
126               change
127
128       -i string
129               (Advanced Use Only) ID of the nvpair object to change/delete
130
131

EXAMPLES

133       Listing all resources
134              crm_resource -L
135
136       Checking where a resource is running (and if it does)
137              crm_resource -W -r my_first_ip
138
139              resource my_first_ip is running on: server1
140
141              crm_resource -W -r my_first_ip
142
143              resource my_first_ip is NOT running
144
145       Start/stop a resource
146              crm_resource -r my_first_ip -p target_role -v started
147
148              crm_resource -r my_first_ip -p target_role -v stopped
149
150       Query the definition of a resource
151              crm_resource -Q -r my_first_ip
152
153       Migrating a resource away from its current location
154              crm_resource -M -r my_first_ip
155
156       Migrating a resource to a specific location
157              crm_resource -M -r my_first_ip -H c001n02
158
159       Allow a resource to return to its normal location
160              crm_resource -U -r my_first_ip
161
162              NOTE:     the     values     of     resource_stickiness      and
163              default_resource_stickiness  may  mean that it doesnt move back.
164              In such cases, you should use -M to move it back  and  then  run
165              this command.
166
167       Deleting a resource from the CR
168              crm_resource -D -r my_first_ip -t primitive
169
170       Deleting a resource group from the CRM
171              crm_resource -D -r my_first_group -t group
172
173       Disabling a resource management for a resource in the CRM
174              crm_resource -p is_managed -r my_first_ip -t primitive -v off
175
176       Enabling a resource management for a resource in the CRM
177              crm_resource -p is_managed -r my_first_ip -t primitive -v on
178
179       Resetting a failed resource after having been manually cleaned up
180              crm_resource -C -H c001n02 -r my_first_ip
181
182       Rechecking all nodes for resources started outside of the CRM
183              crm_resource -P
184
185       Rechecking one node for resources started outside of the CRM
186              crm_resource -P -H c001n02
187

FILES

SEE ALSO

190       cibadmin(8), crmadmin(8), lrmadmin(8), heartbeat(8)
191

NOTES

AUTHOR

194       crm_resource was written by Andrew Beekhof.
195
196       This  manual  page  was  originally  written by Gildas Le Nadan (Genome
197       Research Limited, 2006).
198

CAVEATS

BUGS

201Linux-HA/OpenHA Project  $Date: 2006/08/31 11:53:00 $          CRM_RESOURCE(8)
Impressum