Whamcloud - gitweb
e8a18cc9c3f127514574a143de2ffbc0799a205d
[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 .RE
116 .TP
117 .BR --component-id | --comp-id [ =\fIid ]| -I [ \fIid ]
118 Print only the component ID number for the component(s).  The file-unique
119 component ID is assigned as each component is created, and is not re-used.
120 The ID is
121 .B not
122 necessarily related to the offset of the component within the file, in
123 particular since replicated file layouts may have overlapping extents.
124 If
125 .I id
126 is specified, then print only the fields for the matching component.
127 .TP
128 .BR --component-start | --comp-start [ = [ +- ] \fIstart [ KMGTPE ]]
129 Print only the component start offset (in bytes) for the component(s).
130 If the component
131 .I start
132 offset is specified (with optional suffix for SI units), print only the
133 attributes of the component(s) with the given starting offset.  If
134 .BI + start
135 or
136 .BI - start
137 is used, print components with respectively a larger or smaller
138 .I start
139 offset.
140 .TP
141 .BR --mirror-index = [\fB+-\fR]\fR<\fIindex\fR>
142 Print only the components of \fI<index>\fR-th mirror, based on the order
143 that the mirror components are stored in the file layout, The \fIindex\fR
144 starts at 1. If
145 .BI + index
146 or
147 .BI - index
148 is used, print components of mirror(s) respectively a later or earlier
149 \fIindex\fR-th mirror.
150 .RS 1.2i
151 .TP
152 .B !
153 Negates the meaning. Using + before \fIindex\fR means mirror appears 'later
154 than \fIindex\fR',
155 - before \fIindex\fR means mirror appears 'earlier than \fIindex\fR'. If
156 neither is used, it means 'equal to \fIindex\fR'.
157 .RE
158 .TP
159 .BR --mirror-id = [\fB+-\fR]\fR<\fIid\fR>
160 Print only the component s of the mirror with ID of \fIid\fR. The mirror IDs
161 are assigned to new mirrors as they are created, but may not be sequential if
162 some mirrors are removed. If
163 .BI + id
164 or
165 .BI - id
166 is used, print components of mirror(s) with respectively a larger or smaller
167 mirror ID of
168 .I id
169 .
170 .RS 1.2i
171 .TP
172 .B !
173 Negates the meaning. Using + before \fIid\fR means mirror with ID 'larger
174 than \fIid\fR', - before \fIid\fR means mirror with ID 'smaller than \fIid\fR'.
175 If neither is used, it means 'equal to \fIid\fR'.
176 .RE
177 .TP
178 .BR --directory | -d
179 Get striping information for only the specified directory, like
180 .RB ' "ls -d" '.
181 .TP
182 .BR --fid | -F
183 Show only the 128-bit unique Lustre File Identifier (FID).
184 .TP
185 .B --generation | -g
186 Print only the layout generation number.
187 .TP
188 .BR --layout
189 Show only the file layout, which is one of:
190 .RS 1.2i
191 .TP
192 .B raid0
193 Traditional Lustre RAID-0 striping format.
194 .TP
195 .B released
196 HSM-archived files that are not resident in the filesystem.
197 .TP
198 .B mdt
199 Files that have the first data component on an MDT.
200 .RE
201 .TP
202 .BR --mdt | --mdt-index | -m
203 Show the MDT index on which the file or directory inode is located.
204 .TP
205 .BR --ost | -O
206 Print the starting OST index for the file layout.
207 .TP
208 .BR --pool | -p
209 Print only the OST pool name on which the file was created.
210 .TP
211 .BR --quiet | -q
212 Print only allocated objects for each file, not other layout parameters.
213 .TP
214 .BR --raw | -R
215 Print layout information without substituting the filesystem's default values
216 for unspecified fields. If the file layout is not set, 0, 0, and -1 will be
217 printed for the stripe_count, stripe_size, and stripe_offset respectively.
218 .TP
219 .BR --recursive | -r
220 Recurse into all subdirectories.
221 .TP
222 .BR --stripe-count | -c
223 Print the number of stripes in the file.  For composite files this is
224 the stripe count of the last initialized component.
225 .TP
226 .BR --stripe-index | -i
227 Print the starting OST index for the file layout.
228 .TP
229 .BR --stripe-size | -S
230 Print the stripe size in bytes.  For composite files this is the stripe
231 size of the last initialized component.
232 .TP
233 .BR --verbose | -v
234 Also print the layout magic, FID sequence, FID object ID, and FID, in
235 addition to the normally-printed attributes.
236 .TP
237 .BR --yaml | -y
238 Always print the layout in YAML format, rather than only using this
239 format for composite files.
240 .br
241 .SH EXAMPLES
242 .TP
243 .B $ lfs getstripe -v /mnt/lustre/file1
244 List the detailed object allocation of the given file.
245 .TP
246 .B $ lfs getstripe -v -I2 /mnt/lustre/file1
247 List the detailed information of only component with ID 2 of the given file.
248 .TP
249 .B $ lfs getstripe --mirror-index=+1 /mnt/lustre/file1
250 Print the mirror(s) appearing later than the first mirror in the the file.
251 .TP
252 .B $ lfs getstripe ! --mirror-id=2 /mnt/lustre/file1
253 Print the mirror(s) with mirror ID other than 2 in the file.
254 .TP
255 .B $ lfs getstripe --component-flags=^init -I /mnt/lustre/file1
256 Print only the component IDs for all the uninitialized components.
257 .TP
258 .B $ lfs getstripe --component-flags=init,^stale -I /mnt/lustre/file1
259 Print only the component(s) that are instantiated but not stale.
260 .TP
261 .B $ lfs getstripe -E-64M /mnt/lustre/file1
262 List information of components in a file with extent end less than 64MiB.
263 .TP
264 .B $ lfs getstripe -I3 --component-start /mnt/lustre/file1
265 Print only the component start for the component with ID of 3
266 .TP
267 .B $ lfs getstripe --yaml /mnt/lustre/file1
268 Lists the information of the components of a file in YAML format.
269 .SH AUTHOR
270 The lfs command is part of the Lustre filesystem.
271 .SH SEE ALSO
272 .BR lfs (1),
273 .BR lfs-find (1),
274 .BR lfs-getdirstripe (1),
275 .BR lfs-setstripe (1),
276 .BR lustre (7)