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