1 | .TH mmapplypolicy 03/23/06 |
---|
2 | mmapplypolicy Command |
---|
3 | .SH "Name" |
---|
4 | .PP |
---|
5 | \fBmmapplypolicy\fR - Deletes files or migrates file data between |
---|
6 | storage pools in accordance with policy rules. |
---|
7 | .SH "Synopsis" |
---|
8 | .PP |
---|
9 | \fBmmapplypolicy\fR {\fIDevice\fR | \fIDirectory\fR} \fB[-P\fR |
---|
10 | \fIPolicyFile\fR\fB] [-I {\fR\fB\fIyes\fR\fR \fB| defer | test}]\fR |
---|
11 | \fB[-L\fR \fIn\fR \fB] [-D\fR |
---|
12 | \fIyyyy-mm-dd\fR\fB[\fR\fI@hh:mm\fR\fB[:\fR\fIss\fR\fB]]] |
---|
13 | [-s\fR \fIWorkDirectory\fR\fB]\fR |
---|
14 | .SH "Description" |
---|
15 | .PP |
---|
16 | Use the \fBmmapplypolicy\fR command to manage the placement and |
---|
17 | replication of data within GPFS storage pools. It can also be used to |
---|
18 | delete files from GPFS. You may issue the \fBmmapplypolicy\fR |
---|
19 | command from any node in the GPFS cluster that has the file system |
---|
20 | mounted. |
---|
21 | .PP |
---|
22 | Any given file is a potential candidate for at most one \fBMIGRATE\fR or |
---|
23 | \fBDELETE\fR operation during one invocation of the \fBmmapplypolicy\fR |
---|
24 | command. |
---|
25 | .PP |
---|
26 | A file that matches an \fBEXCLUDE\fR rule is not subject to any |
---|
27 | subsequent \fBMIGRATE\fR or \fBDELETE\fR rules. You should |
---|
28 | carefully consider the order of rules within a policy to avoid unintended |
---|
29 | consequences. |
---|
30 | .PP |
---|
31 | For detailed information on GPFS policies, see the chapter |
---|
32 | \fIPolicy-based data management for |
---|
33 | GPFS\fR in |
---|
34 | \fIGeneral Parallel File |
---|
35 | System: Advanced Administration Guide\fR. |
---|
36 | .SH "Parameters" |
---|
37 | .PP |
---|
38 | .RS +3 |
---|
39 | \fB\fIDevice\fR |
---|
40 | \fR |
---|
41 | .RE |
---|
42 | .RS +9 |
---|
43 | Specifies the device name of the file system from which files are to be |
---|
44 | deleted or migrated. File system names need not be |
---|
45 | fully-qualified. \fBfs0\fR is just as acceptable as |
---|
46 | \fB/dev/fs0\fR. If specified, this must be the first |
---|
47 | parameter. |
---|
48 | .RE |
---|
49 | .PP |
---|
50 | .RS +3 |
---|
51 | \fB\fIDirectory\fR |
---|
52 | \fR |
---|
53 | .RE |
---|
54 | .RS +9 |
---|
55 | Specifies the fully-qualified path name of a GPFS file system |
---|
56 | subtree from which files are to be deleted or migrated. If specified, |
---|
57 | this must be the first parameter. |
---|
58 | .RE |
---|
59 | .PP |
---|
60 | .RS +3 |
---|
61 | \fB-I {\fB\fIyes\fR\fR | defer | test} |
---|
62 | \fR |
---|
63 | .RE |
---|
64 | .RS +9 |
---|
65 | Specifies what actions the \fBmmapplypolicy\fR command performs on |
---|
66 | files: |
---|
67 | .PP |
---|
68 | .RS +3 |
---|
69 | \fByes |
---|
70 | \fR |
---|
71 | .RE |
---|
72 | .RS +9 |
---|
73 | Indicates that all applicable \fBMIGRATE\fR and \fBDELETE\fR policy |
---|
74 | rules are run, and the data movement between pools is done during the |
---|
75 | processing of the \fBmmapplypolicy\fR command. This is the default |
---|
76 | action. |
---|
77 | .RE |
---|
78 | .PP |
---|
79 | .RS +3 |
---|
80 | \fBdefer |
---|
81 | \fR |
---|
82 | .RE |
---|
83 | .RS +9 |
---|
84 | Indicates that all applicable \fBMIGRATE\fR and \fBDELETE\fR policy |
---|
85 | rules are run, but actual data movement between pools is deferred until the |
---|
86 | next |
---|
87 | \fBmmrestripefs\fR or \fBmmrestripefile\fR command. |
---|
88 | .RE |
---|
89 | .PP |
---|
90 | .RS +3 |
---|
91 | \fBtest |
---|
92 | \fR |
---|
93 | .RE |
---|
94 | .RS +9 |
---|
95 | Indicates that all policy rules are evaluated, but the |
---|
96 | \fBmmapplypolicy\fR command only displays the actions that would be |
---|
97 | performed had \fB-I defer\fR or \fB-I yes\fR been specified. |
---|
98 | There is no actual deletion of files or data movement between pools. |
---|
99 | This option is intended for testing the effects of particular policy |
---|
100 | rules. |
---|
101 | .RE |
---|
102 | .RE |
---|
103 | .PP |
---|
104 | .RS +3 |
---|
105 | \fB-P \fIPolicyFile\fR |
---|
106 | \fR |
---|
107 | .RE |
---|
108 | .RS +9 |
---|
109 | Specifies the name of the file containing the policy rules to be |
---|
110 | applied. If not specified, the policy rules currently in effect for the |
---|
111 | file system are used. |
---|
112 | .RE |
---|
113 | .SH "Options" |
---|
114 | .PP |
---|
115 | .RS +3 |
---|
116 | \fB-D |
---|
117 | \fIyyyy-mm-dd\fR\fB[\fR\fI@hh:mm\fR\fB[:\fR\fIss\fR]] |
---|
118 | \fR |
---|
119 | .RE |
---|
120 | .RS +9 |
---|
121 | Specifies a date and optionally a (UTC) time as \fIyear-month-day\fR at |
---|
122 | \fIhour:minute:second\fR. |
---|
123 | .PP |
---|
124 | The \fBmmapplypolicy\fR command evaluates policy rules as if it were |
---|
125 | running on the date and time specified by the \fB-D\fR flag. |
---|
126 | This can be useful for planning or testing policies, to see how the |
---|
127 | \fBmmapplypolicy\fR command would act in the future. If this flag is |
---|
128 | omitted, the \fBmmapplypolicy\fR command uses the current date and (UTC) |
---|
129 | time. If a date is specified but not a time, the time is assumed to be |
---|
130 | 00:00:00. |
---|
131 | .RE |
---|
132 | .PP |
---|
133 | .RS +3 |
---|
134 | \fB-L \fIn\fR |
---|
135 | \fR |
---|
136 | .RE |
---|
137 | .RS +9 |
---|
138 | Controls the level of information displayed by the \fBmmapplypolicy\fR |
---|
139 | command. Larger values indicate the display of more detailed |
---|
140 | information. These terms are used: |
---|
141 | .PP |
---|
142 | .RS +3 |
---|
143 | \fBcandidate file |
---|
144 | \fR |
---|
145 | .RE |
---|
146 | .RS +9 |
---|
147 | A file that matches a \fBMIGRATE\fR or \fBDELETE\fR policy |
---|
148 | rule. |
---|
149 | .RE |
---|
150 | .PP |
---|
151 | .RS +3 |
---|
152 | \fBchosen file |
---|
153 | \fR |
---|
154 | .RE |
---|
155 | .RS +9 |
---|
156 | A candidate file that has been scheduled for migration or deletion. |
---|
157 | .RE |
---|
158 | .PP |
---|
159 | These are the valid values for \fIn\fR: |
---|
160 | .PP |
---|
161 | .RS +3 |
---|
162 | \fB0 |
---|
163 | \fR |
---|
164 | .RE |
---|
165 | .RS +9 |
---|
166 | Displays only serious errors. |
---|
167 | .RE |
---|
168 | .PP |
---|
169 | .RS +3 |
---|
170 | \fB1 |
---|
171 | \fR |
---|
172 | .RE |
---|
173 | .RS +9 |
---|
174 | Displays some information as the command runs, but not for each |
---|
175 | file. This is the default. |
---|
176 | .RE |
---|
177 | .PP |
---|
178 | .RS +3 |
---|
179 | \fB2 |
---|
180 | \fR |
---|
181 | .RE |
---|
182 | .RS +9 |
---|
183 | Displays each chosen file and the scheduled migration or deletion |
---|
184 | action. |
---|
185 | .RE |
---|
186 | .PP |
---|
187 | .RS +3 |
---|
188 | \fB3 |
---|
189 | \fR |
---|
190 | .RE |
---|
191 | .RS +9 |
---|
192 | All of the above, plus displays each candidate file and the applicable |
---|
193 | rule. |
---|
194 | .RE |
---|
195 | .PP |
---|
196 | .RS +3 |
---|
197 | \fB4 |
---|
198 | \fR |
---|
199 | .RE |
---|
200 | .RS +9 |
---|
201 | All of the above, plus displays each explicitly \fBEXCLUDE\fR'ed |
---|
202 | file, and the applicable rule. |
---|
203 | .RE |
---|
204 | .PP |
---|
205 | .RS +3 |
---|
206 | \fB5 |
---|
207 | \fR |
---|
208 | .RE |
---|
209 | .RS +9 |
---|
210 | All of the above, plus displays the attributes of candidate and |
---|
211 | \fBEXCLUDE\fR'ed files. |
---|
212 | .RE |
---|
213 | .PP |
---|
214 | .RS +3 |
---|
215 | \fB6 |
---|
216 | \fR |
---|
217 | .RE |
---|
218 | .RS +9 |
---|
219 | All of the above, plus displays files that are not candidate files, and |
---|
220 | their attributes. |
---|
221 | .RE |
---|
222 | .PP |
---|
223 | For examples and more information on this flag, see the |
---|
224 | section: \fIThe mmapplypolicy -L command\fR in |
---|
225 | \fIGeneral Parallel File System: Problem |
---|
226 | Determination Guide\fR. |
---|
227 | .RE |
---|
228 | .PP |
---|
229 | .RS +3 |
---|
230 | \fB-s \fIWorkDirectory\fR |
---|
231 | \fR |
---|
232 | .RE |
---|
233 | .RS +9 |
---|
234 | Specifies the directory to be used for temporary storage during |
---|
235 | \fBmmapplypolicy\fR command processing. |
---|
236 | .PP |
---|
237 | The default directory is \fB/tmp\fR. The \fBmmapplypolicy\fR |
---|
238 | command stores lists of candidate and chosen files in temporary files within |
---|
239 | this directory. |
---|
240 | .RE |
---|
241 | .SH "Exit status" |
---|
242 | .PP |
---|
243 | .PP |
---|
244 | .RS +3 |
---|
245 | \fB0 |
---|
246 | \fR |
---|
247 | .RE |
---|
248 | .RS +9 |
---|
249 | Successful completion. |
---|
250 | .RE |
---|
251 | .PP |
---|
252 | .RS +3 |
---|
253 | \fBnonzero |
---|
254 | \fR |
---|
255 | .RE |
---|
256 | .RS +9 |
---|
257 | A failure has occurred. |
---|
258 | .RE |
---|
259 | .SH "Security" |
---|
260 | .PP |
---|
261 | You must have root authority to run the \fBmmapplypolicy\fR |
---|
262 | command. |
---|
263 | .PP |
---|
264 | You may issue the \fBmmapplypolicy\fR command from any node in the GPFS |
---|
265 | cluster that has the file systems mounted. |
---|
266 | .PP |
---|
267 | When using the \fBrcp\fR and \fBrsh\fR commands for remote |
---|
268 | communication, a properly configured \fB.rhosts\fR file must exist |
---|
269 | in the root user's home directory on each node in the GPFS |
---|
270 | cluster. If you have designated the use of a different remote |
---|
271 | communication program on either the |
---|
272 | \fBmmcrcluster\fR |
---|
273 | or the |
---|
274 | \fBmmchcluster\fR command, you must |
---|
275 | ensure: |
---|
276 | .RS +3 |
---|
277 | .HP 3 |
---|
278 | 1. Proper authorization is granted to all nodes in the GPFS cluster. |
---|
279 | .HP 3 |
---|
280 | 2. The nodes in the GPFS cluster can communicate without the use of a |
---|
281 | password, and without any extraneous messages. |
---|
282 | .RE |
---|
283 | .SH "Examples" |
---|
284 | .RS +3 |
---|
285 | .HP 3 |
---|
286 | 1. This command displays the actions that would occur if a policy were |
---|
287 | applied, but does not apply the policy at this time: |
---|
288 | .sp |
---|
289 | .nf |
---|
290 | mmapplypolicy fs1 -I test |
---|
291 | .fi |
---|
292 | .sp |
---|
293 | The system displays output similar to: |
---|
294 | .sp |
---|
295 | .nf |
---|
296 | GPFS Current Data Pool Utilization in KB and % |
---|
297 | sp1 2196992 140095488 1.568210% |
---|
298 | system 444672 140095488 0.317406% |
---|
299 | Loaded policy rules from /var/mmfs/tmp/polFile.mmapplypolicy.18754. |
---|
300 | Evaluating MIGRATE/DELETE/EXCLUDE rules with\ |
---|
301 | CURRENT_TIMESTAMP = 2006-03-16@19:58:49 UTC |
---|
302 | parsed 2 Placement Rules, 2 Migrate/Delete/Exclude Rules |
---|
303 | Directories scan: 7 files, 2 directories, 0 other objects, |
---|
304 | 0 'skipped' files and/or errors. |
---|
305 | Inodes scan: 7 files, 0 'skipped' files and/or errors. |
---|
306 | Summary of Rule Applicability and File Choices: |
---|
307 | Rule# Hit_Cnt Chosen KB_Chosen KB_Ill Rule |
---|
308 | 0 3 3 2097160 0\ |
---|
309 | RULE 'migrate to system' MIGRATE FROM POOL 'sp1' TO POOL 'system' |
---|
310 | 1 4 4 32 0\ |
---|
311 | RULE 'migrate to sp1' MIGRATE FROM POOL 'system' TO POOL 'sp1' |
---|
312 | GPFS Policy Decisions and File Choice Totals: |
---|
313 | Chose to migrate 2097192KB: 7 of 7 candidates; |
---|
314 | Chose to delete 0KB: 0 of 0 candidates; |
---|
315 | 0KB of chosen data is illplaced or illreplicated; |
---|
316 | Predicted Data Pool Utilization in KB and %: |
---|
317 | sp1 99864 140095488 0.071283% |
---|
318 | system 2541800 140095488 1.814334% |
---|
319 | .fi |
---|
320 | .sp |
---|
321 | .HP 3 |
---|
322 | 2. This command applies a policy immediately: |
---|
323 | .sp |
---|
324 | .nf |
---|
325 | mmapplypolicy fs1 -L 2 |
---|
326 | .fi |
---|
327 | .sp |
---|
328 | The system displays output similar to: |
---|
329 | .sp |
---|
330 | .nf |
---|
331 | GPFS Current Data Pool Utilization in KB and % |
---|
332 | sp1 2196992 140095488 1.568210% |
---|
333 | system 444928 140095488 0.317589% |
---|
334 | Loaded policy rules from /var/mmfs/tmp/polFile.mmapplypolicy.19118. |
---|
335 | Evaluating MIGRATE/DELETE/EXCLUDE rules with\ |
---|
336 | CURRENT_TIMESTAMP = 2006-03-16@20:06:25 UTC |
---|
337 | parsed 2 Placement Rules, 2 Migrate/Delete/Exclude Rules |
---|
338 | Directories scan: 7 files, 2 directories, 0 other objects,\ |
---|
339 | 0 'skipped' files and/or errors. |
---|
340 | Inodes scan: 7 files, 0 'skipped' files and/or errors. |
---|
341 | Summary of Rule Applicability and File Choices: |
---|
342 | Rule# Hit_Cnt Chosen KB_Chosen KB_Ill Rule |
---|
343 | 0 3 3 2097160 0\ |
---|
344 | RULE 'migrate to system' MIGRATE FROM POOL 'sp1' TO POOL 'system' |
---|
345 | 1 4 4 32 0\ |
---|
346 | RULE 'migrate to sp1' MIGRATE FROM POOL 'system' TO POOL 'sp1' |
---|
347 | GPFS Policy Decisions and File Choice Totals: |
---|
348 | Chose to migrate 2097192KB: 7 of 7 candidates; |
---|
349 | Chose to delete 0KB: 0 of 0 candidates; |
---|
350 | 0KB of chosen data is illplaced or illreplicated; |
---|
351 | Predicted Data Pool Utilization in KB and %: |
---|
352 | sp1 99864 140095488 0.071283% |
---|
353 | system 2542056 140095488 1.814517% |
---|
354 | MIGRATED /fs1/file.2 TO POOL sp1 |
---|
355 | MIGRATED /fs1/file.1 TO POOL sp1 |
---|
356 | MIGRATED /fs1/mydir/tmp.0 TO POOL system |
---|
357 | MIGRATED /fs1/mydir/file.0 TO POOL sp1 |
---|
358 | MIGRATED /fs1/file.0 TO POOL sp1 |
---|
359 | MIGRATED /fs1/tmp.2 TO POOL system |
---|
360 | MIGRATED /fs1/tmp.1 TO POOL system |
---|
361 | A total of 7 files have been migrated and/or deleted;\ |
---|
362 | 0 'skipped' files and/or errors. |
---|
363 | .fi |
---|
364 | .sp |
---|
365 | .HP 3 |
---|
366 | 3. Additional examples of GPFS policies and using the \fBmmapplypolicy\fR |
---|
367 | command are in the chapter |
---|
368 | \fIPolicy-based data management for |
---|
369 | GPFS\fR in |
---|
370 | \fIGeneral Parallel File |
---|
371 | System: Advanced Administration Guide\fR. |
---|
372 | .RE |
---|
373 | .SH "See also" |
---|
374 | .PP |
---|
375 | mmchpolicy Command |
---|
376 | .PP |
---|
377 | mmlspolicy Command |
---|
378 | .SH "Location" |
---|
379 | .PP |
---|
380 | \fB/usr/lpp/mmfs/bin\fR |
---|