source: gpfs_3.1_ker2.6.20/share/man/man8/mmapplypolicy.8 @ 195

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