Whamcloud - gitweb
LU-930 utils: document 'lfs getstripe -N' option
[fs/lustre-release.git] / lustre / doc / lfs-getstripe.1
1 .TH lfs-getstripe 1 "2018-01-24" Lustre "user utilities"
2 .SH NAME
3 lfs getstripe \- Lustre client command to print layout parameters of a file
4 .SH SYNOPSIS
5 .B lfs getstripe
6 [\fB--component-count\fR|\fB--comp-count\fR]
7       [\fB--component-end\fR|\fB--comp-end\fR|\fB-E\fR[\fB=\fR[\fB+-\fR]\fIend\fR[\fBKMGTPE\fR]]
8       [\fB--component-flags\fR|\fB--comp-flags\fR[\fB=\fIflags\fR]]
9       [\fB--component-id\fR|\fB--comp-id\fR[=\fIid\fR]|\fB-I\fR[\fIid\fR]]
10       [\fB--component-start\fR[\fB=\fR[\fB+-\fR]\fIstart\fR[\fBKMGTPE\fR]]]
11       [\fB--extension-size\fR|\fB--ext-size\fR|\fB-z\fR]
12       [\fB--directory\fR|\fB-d\fR]
13 [\fB--fid\fR|\fB-F\fR]
14 [\fB--generation\fR|\fB-g\fR]
15       [\fB--layout\fR|\fB-L\fR]
16 [\fB--mdt\fR|\fB--mdt-index\fR|\fB-m\fR]
17 [\fB--ost\fR|\fB-O\fR <\fIuuid\fR>]
18       [\fB--pool\fR|\fB-p\fR]
19 [\fB--quiet\fR|\fB-q\fR]
20 [\fB--recursive\fR|\fB-r\fR]
21       [\fB--raw\fR|\fB-R\fR]
22 [\fB--stripe-count\fR|\fB-c\fR]
23 [\fB--stripe-index\fR|\fB-i\fR]
24       [\fB--stripe-size\fR|\fB-S\fR] [\fB--mirror-count\fR|\fB-N\fR]
25       [[\fB!\fR] \fB--mirror-index\fR=[\fB+-\fR]\fI<index>\fR | [\fB!\fR] \fB--mirror-id\fR=[\fB+-\fR]\fI<id>\fR]
26       [\fB--verbose\fR|\fB-v\fR]
27 [\fB--yaml\fR|\fB-y\fR]
28 <\fIdirname\fR|\fIfilename\fR> ...
29 .SH DESCRIPTION
30 .B lfs getstripe
31 is used to list the layout/striping information for a given filename or
32 directory tree.  By default the stripe_count, stripe_size, stripe_offset,
33 and allocated OST objects for each file will be shown. If you only want
34 specific layout information to be printed, then the
35 .BR --stripe-count ,
36 .BR --stripe-size ,
37 .BR --extension-size ,
38 .BR --stripe-index ,
39 .BR --layout ,
40 .BR --fid ,
41 .BR --generation ,
42 .BR --component-id ,
43 .BR --component-flags ,
44 .BR --component-count ,
45 .BR --component-start ,
46 .BR --component-end ,
47 .BR --pool
48 or
49 .BR --mirror-index
50 or
51 .BR --mirror-id
52 options, or equivalent single-character options, can be used without an
53 argument to return only the specified field(s).
54 .PP
55 You can limit the displayed content to one or more specific components or
56 mirror of a composite file layout by specifying the matching
57 parameter(s) for the
58 .BR --component-id ,
59 .BR --component-flags ,
60 .BR --component-start ,
61 .BR --component-end ,
62 .BR --mirror-index ,
63 or
64 .BR --mirror-id ,
65 or their single-character options. For single-character options, the
66 argument must follow the option without a space, and for long options an
67 .RB ' = '
68 sign must be used.
69 .PP
70 The default behavior when a directory is specified is to list the striping
71 information for all files within the specified directory (like
72 .RB ' "ls -l <directory>" ').
73 .SH OPTIONS
74 .TP
75 .BR --component-count | --comp-count
76 Print only the number of components in the file's layout.
77 .TP
78 .BR --component-end | --comp-end [ = [ +- ] \fIend [ KMGTPE ]]| -E [[ +- ] \fIend [ KMGTPE ]]
79 Print only the component end offset (in bytes) for the component(s).
80 If the component
81 .I end
82 offset is specified (with optional suffix for SI units), print only the
83 attributes of the component(s) with the given end offset.  If
84 .BI + end
85 or
86 .BI - end
87 is used, print components with respectively a larger or smaller
88 .I end
89 offset.
90 .TP
91 .BR --component-flags | --comp-flags [ = [ ^ ] \fIflag ,...]]
92 Print only the component flags.  If
93 .I flag
94 is specified, print only components matching the specified
95 .I flag
96 set.  If
97 .BI ^ flag
98 is used, print only components not matching
99 .IR flag .
100 Multiple flags may be specified, separated by commas.  Valid flag names are:
101 .RS 1.2i
102 .TP
103 .B init
104 Component has been initialized (has allocated OST objects).
105 .TP
106 .B stale
107 Replicated (mirrored) components that do not have up-to-date data.  Stale
108 components will not be used for read or write operations, and need to be
109 resynched using
110 .B lfs mirror resync
111 before they can be accessed again.
112 .TP
113 .B prefer
114 Replicated (mirrored) components that are preferred for read or write.
115 For example, because they are located on SSD-based OSTs, or are more
116 local on the network to clients.
117 .TP
118 .B nosync
119 Replicated (mirrored) components that do not resync using \fB
120 lfs mirror resync\fR.  Files with the \fBnosync\fR flag will also
121 print the timestamp when the flag was set on the replica.
122 .RE
123 .TP
124 .BR --component-id | --comp-id [ =\fIid ]| -I [ \fIid ]
125 Print only the component ID number for the component(s).  The file-unique
126 component ID is assigned as each component is created, and is not re-used.
127 The ID is
128 .B not
129 necessarily related to the offset of the component within the file, in
130 particular since replicated file layouts may have overlapping extents.
131 If
132 .I id
133 is specified, then print only the fields for the matching component.
134 .TP
135 .BR --component-start | --comp-start [ = [ +- ] \fIstart [ KMGTPE ]]
136 Print only the component start offset (in bytes) for the component(s).
137 If the component
138 .I start
139 offset is specified (with optional suffix for SI units), print only the
140 attributes of the component(s) with the given starting offset.  If
141 .BI + start
142 or
143 .BI - start
144 is used, print components with respectively a larger or smaller
145 .I start
146 offset.
147 .TP
148 .BR --directory | -d
149 Get striping information for only the specified directory, like
150 .RB ' "ls -d" '.
151 .TP
152 .BR --fid | -F
153 Show only the 128-bit unique Lustre File Identifier (FID).
154 .TP
155 .B --generation | -g
156 Print only the layout generation number.
157 .TP
158 .BR --layout
159 Show only the file layout, which is one of:
160 .RS 1.2i
161 .TP
162 .B raid0
163 Traditional Lustre RAID-0 striping format.
164 .TP
165 .B released
166 HSM-archived files that are not resident in the filesystem.
167 .TP
168 .B mdt
169 Files that have the first data component on an MDT.
170 .RE
171 .TP
172 .BR --mdt | --mdt-index | -m
173 Show the MDT index on which the file or directory inode is located.
174 .TP
175 .BR --mirror-count | -N
176 Print the number of mirrors on the file.
177 .TP
178 .BR --mirror-index = [\fB+-\fR]\fR<\fIindex\fR>
179 Print only the components of \fI<index>\fR-th mirror, based on the order
180 that the mirror components are stored in the file layout. The \fIindex\fR
181 starts at 1. If
182 .BI + index
183 or
184 .BI - index
185 is used, print components of mirror(s) respectively later or earlier than
186 the \fIindex\fR-th mirror.
187 .RS 1.2i
188 .TP
189 .B !
190 Negates the meaning. Using + before \fIindex\fR means mirror appears 'later
191 than \fIindex\fR',
192 - before \fIindex\fR means mirror appears 'earlier than \fIindex\fR'. If
193 neither is used, it means 'equal to \fIindex\fR'.
194 .RE
195 .TP
196 .BR --mirror-id = [\fB+-\fR]\fR<\fIid\fR>
197 Print only the components of the mirror with ID of \fIid\fR. The mirror IDs
198 are assigned to new mirrors as they are created, but may not be sequential
199 if some mirrors are removed. If
200 .BI + id
201 or
202 .BI - id
203 is used, print components of mirror(s) with respectively a larger or smaller
204 mirror ID of
205 .I id
206 .
207 .RS 1.2i
208 .TP
209 .B !
210 Negates the meaning. Using + before \fIid\fR means mirror with ID 'larger
211 than \fIid\fR', - before \fIid\fR means mirror with ID 'smaller than \fIid\fR'.
212 If neither is used, it means 'equal to \fIid\fR'.
213 .RE
214 .TP
215 .BR --ost | -O
216 Print the starting OST index for the file layout.
217 .TP
218 .BR --pool | -p
219 Print only the OST pool name on which the file was created.
220 .TP
221 .BR --quiet | -q
222 Print only allocated objects for each file, not other layout parameters.
223 .TP
224 .BR --raw | -R
225 Print layout information without substituting the filesystem's default values
226 for unspecified fields. If the file layout is not set, 0, 0, and -1 will be
227 printed for the stripe_count, stripe_size, and stripe_offset respectively.
228 .TP
229 .BR --recursive | -r
230 Recurse into all subdirectories.
231 .TP
232 .BR --stripe-count | -c
233 Print the number of stripes in the file.  For composite files this is
234 the stripe count of the last initialized component.
235 .TP
236 .BR --stripe-index | -i
237 Print the starting OST index for the file layout.
238 .TP
239 .BR --stripe-size | -S
240 Print the stripe size in bytes.  For composite files this is the stripe
241 size of the last initialized component.
242 .TP
243 .BR --extension-size | --ext-size | -z
244 Print the extension size in bytes. For composite files this is the extension
245 size of the first extension component.
246 .TP
247 .BR --verbose | -v
248 Also print the layout magic, FID sequence, FID object ID, and FID, in
249 addition to the normally-printed attributes.
250 .TP
251 .BR --yaml | -y
252 Always print the layout in YAML format, rather than only using this
253 format for composite files.
254 .br
255 .SH EXAMPLES
256 .TP
257 .B $ lfs getstripe -v /mnt/lustre/file1
258 List the detailed object allocation of the given file.
259 .TP
260 .B $ lfs getstripe -v -I2 /mnt/lustre/file1
261 List the detailed information of only component with ID 2 of the given file.
262 .TP
263 .B $ lfs getstripe --mirror-index=+1 /mnt/lustre/file1
264 Print the mirror(s) appearing later than the first mirror in the the file.
265 .TP
266 .B $ lfs getstripe ! --mirror-id=2 /mnt/lustre/file1
267 Print the mirror(s) with mirror ID other than 2 in the file.
268 .TP
269 .B $ lfs getstripe --component-flags=^init -I /mnt/lustre/file1
270 Print only the component IDs for all the uninitialized components.
271 .TP
272 .B $ lfs getstripe --component-flags=init,^stale -I /mnt/lustre/file1
273 Print only the component(s) that are instantiated but not stale.
274 .TP
275 .B $ lfs getstripe -E-64M /mnt/lustre/file1
276 List information of components in a file with extent end less than 64MiB.
277 .TP
278 .B $ lfs getstripe -I3 --component-start /mnt/lustre/file1
279 Print only the component start for the component with ID of 3
280 .TP
281 .B $ lfs getstripe --yaml /mnt/lustre/file1
282 Lists the information of the components of a file in YAML format.
283 .SH AUTHOR
284 The lfs command is part of the Lustre filesystem.
285 .SH SEE ALSO
286 .BR lfs (1),
287 .BR lfs-find (1),
288 .BR lfs-getdirstripe (1),
289 .BR lfs-setstripe (1),
290 .BR lustre (7)