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