1 .TH LFS-SETSTRIPE 1 2017-08-23 "Lustre" "Lustre Utilities"
3 lfs setstripe \- set striping pattern of a file or directory default
5 .B lfs setstripe \fR[\fISTRIPE_OPTIONS\fR] <\fIdirectory\fR|\fIfilename\fR>
7 .B lfs setstripe \fR{\fB--component-end\fR|\fB-E \fIend1\fR} [\fISTRIPE_OPTIONS\fR]
8 [{\fB--component-end\fR|\fB-E \fIend2\fR} [\fISTRIPE_OPTIONS\fR] ...] <\fIfilename\fR>
10 .B lfs setstripe --component-add \fR{\fB--component-end\fR|\fB-E \fIend1\fR}
11 [\fISTRIPE_OPTIONS\fR] [{\fB--component-end\fR|\fB-E \fIend2\fR} [\fISTRIPE_OPTIONS\fR]
12 \&...] <\fIfilename\fR>
14 .B lfs setstripe --component-del \fR{\fB--component-id\fR|\fB-I \fIcomp_id\fR|
15 .B --component-flags=\fIcomp_flags\fR} <\fIfilename\fR>
17 .B lfs setstripe -d \fR<\fIdirectory\fR>
21 .B lfs setstripe \fR[\fISTRIPE_OPTIONS\fR] <\fIdirectory\fR|\fIfilename\fR>
22 Create a file with specified layout, or set or replace the default file
23 layout on an existing directory. If the default file layout is set on
24 the filesystem root directory, it will be used as the filesystem-wide
25 default layout for all files that do not explicitly specify a layout and
26 do not have a default layout on the parent directory. The default layout
27 set on a directory will be copied to any new subdirectories created within
28 that directory at the time they are created.
30 .B lfs setstripe \fR{\fB--component-end\fR|\fB-E \fIend1\fR} [\fISTRIPE_OPTIONS\fR] \
31 [{\fB--component-end\fR|\fB-E \fIend2\fR} [\fISTRIPE_OPTIONS\fR] ...] <\fIfilename\fR>
33 Create a file with the specified composite layout. Each component defines the
34 stripe pattern of the file in the range of
35 .RI [ start ", " end ].
36 The first component implicitly starts at offset 0, and all later components
37 start at the end of previous extent. The
39 option is used to specify the end offset of each component, and it also
40 indicates the following \fISTRIPE_OPTIONS\fR are for this component. The end
45 indicates the component extends to the end of file.
47 .B lfs setstripe --component-add \fR{\fB--component-end\fR|\fB-E \fIend1\fR} [\fISTRIPE_OPTIONS\fR] \
48 [{\fB--component-end\fR|\fB-E \fIend2\fR} [\fISTRIPE_OPTIONS\fR] ...] <\fIfilename\fR>
50 Add components to an existing composite file. The extent start of the first
51 component to be added is equal to the extent end of last component in existing
52 file, and all components to be added must be adjacent with each other. It is
53 not possible to add components incrementally to the default directory layout,
54 since the entire default layout can be replaced with one
58 .B lfs setstripe --component-del \fR{\fB--component-id\fR|\fB-I \fIcomp_id\fR | \
59 \fB--component-flags \fIcomp_flags\fR} <\fIfilename\fR>
61 Remove the component(s) specified by component ID or flags from an existing
62 file. The ID specified by the
64 option is the numerical unique ID of the component, it can be obtained using
67 command. It is not possible to delete components from a default directory
68 layout, since the entire default layout can be replaced with one
71 The \fB--component-flags\fR option is used to specify certain type of
72 components, such as all instantiated ones.
74 .B lfs setstripe -d \fR<\fIdirectory\fR>
76 Delete the default layout on the specified directory. It is not necessary
77 to delete the default layout on a directory before replacing it. This is
78 only needed if the directory should revert from a directory-specific layout
79 to using the global filesystem default layout stored on the root directory.
81 The various stripe related options are listed and explained below:
83 .B -c\fR, \fB--stripe-count \fR<\fIstripe_count\fR>
84 The number of OSTs to stripe a file over. \fB0 \fRmeans to use the
85 filesystem-wide default stripe count (default 1), and \fB-1 \fRmeans to stripe
86 over all available OSTs.
88 .B -S\fR, \fB--stripe-size \fR<\fIstripe_size\fR>
89 The number of bytes to store on each OST before moving to the next OST. \fB0\fR
90 means to use the filesystem-wide default stripe_size (default 1MB).
92 .B -i\fR, \fB--stripe-index \fR<\fIstart_ost_index\fR>
93 The OST index (starting at 0) on which to start striping for this file. \fB-1\fR
94 allows the MDS to choose the starting index and it is strongly recommended, as
95 this allows space and load balancing to be done by the MDS as needed.
97 .B -o\fR, \fB--ost-list \fR<\fIost_indices\fR>
98 Used to specify the exact stripe layout on the file system. \fIost_indices\fR
99 is a list of OSTs referenced by their indices, which are specified in decimal
100 or hex form and can be obtained using the
102 command. The list format consists of individual OST indices and index ranges
103 separated by commas, e.g. 1,2-4,7. The
105 option may be specified multiple times to stripe across the union of all listed
108 option is combined with
112 must agree with the number of OSTs in
116 option is combined with
120 must be in the OST list, and it will be used as the index on which to start
121 striping the file. Otherwise the striping will occur in the order specified in
124 .B -p\fR, \fB--pool \fR<\fIpool_name\fR>
125 The name of a predefined pool of OSTs (see
127 that will be used for striping. The
132 will be used as well; the
134 must be part of the pool or an error will be returned.
136 .B -L, --layout <\fIlayout type\fB>\fR
137 The type of stripe layout, can be
138 .BR raid0 ", " released " or " mdt ".
143 type allows place the first component of the file on the MDT where the inode
144 is located. This is used with composite file layouts and can be defined as
145 first component only. The
147 of MDT part is always equal to the component size. There is also per-MDT
149 .IR lod.dom_stripesize
150 to limit maximum size of DoM stripe which can be changed with
153 .IR lctl\ set_param\ lod.*.dom_stripesize=0
157 There are two options available only for \fBlfs migrate\fR:
160 Block file access during data migration (default).
163 Abort migrations if concurrent access is detected.
164 .SH COMPONENT_OPTIONS
165 The various component related options are listed and explained below:
167 .B -E\fR,\fB--component-end \fR< \fIend\fR>
168 The end offset of the component,
170 is specified in bytes, or using a suffix (kMGTP),
171 such as 256M. \fB-1\fR means the end of file.
173 .B -I\fR, \fB--component-id \fR<\fIcomp_id\fR>
174 The numerical unique component id.
176 .B --component-flags \fR<\fIflags\fR>
177 Component flags. Available \fIflags\fR:
180 .B init\fR: instantiated component.
183 .B ^init\fR: uninstantiated component.
188 Add specified components to an existing composite file.
191 Delete specified the components from an existing file. Deletion must start
192 with the last component.
195 .B $ lfs setstripe -S 128k -c 2 /mnt/lustre/file1
196 This creates a file striped on two OSTs with 128kB on each stripe.
198 .B $ lfs setstripe -d /mnt/lustre/dir
199 This deletes a default stripe pattern on dir. New files created in that
200 directory will use the filesystem global default instead.
202 .B $ lfs setstripe -E 4M -c 1 -E 64M -c 4 -E -1 -c -1 /mnt/lustre/file1
203 This creates a file with composite layout, the component has 1 stripe and \
204 covers [0, 4M), the second component has 4 stripes and covers [4M, 64M), the \
205 last component stripes over all available OSTs and covers [64M, EOF).
207 .B $ lfs setstripe --component-add -E -1 -c 4 /mnt/lustre/file1
208 This add a component which start from the end of last existing component to \
211 .B $ lfs setstripe --component-del -I 1 /mnt/lustre/file1
212 This deletes the component with ID equals 1 from an existing file.
214 .B $ lfs setstripe -E 1M -L mdt -E -1 /mnt/lustre/file1
215 This created file with Data-on-MDT layout. The first 1M is placed on MDT and \
216 rest of file is placed on OST with default striping.