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