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. New subdirectories
27 created under root directory will not explicitly copy the default layout
28 at creation time, but will implicitly inherit the default layout at runtime.
29 The default layout set on a non-root directory will be copied to any new
30 subdirectories created within that directory at the time they are created.
32 .B lfs setstripe \fR{\fB--component-end\fR|\fB-E \fIend1\fR} [\fISTRIPE_OPTIONS\fR] \
33 [{\fB--component-end\fR|\fB-E \fIend2\fR} [\fISTRIPE_OPTIONS\fR] ...] <\fIfilename\fR>
35 Create a file with the specified composite layout. Each component defines the
36 stripe pattern of the file in the range of
37 .RI [ start ", " end ].
38 The first component implicitly starts at offset 0, and all later components
39 start at the end of previous extent. The
41 option is used to specify the end offset of each component, and it also
42 indicates the following \fISTRIPE_OPTIONS\fR are for this component. The end
47 indicates the component extends to the end of file.
49 .B lfs setstripe --component-add \fR{\fB--component-end\fR|\fB-E \fIend1\fR} [\fISTRIPE_OPTIONS\fR] \
50 [{\fB--component-end\fR|\fB-E \fIend2\fR} [\fISTRIPE_OPTIONS\fR] ...] <\fIfilename\fR>
52 Add components to an existing composite file. The extent start of the first
53 component to be added is equal to the extent end of last component in existing
54 file, and all components to be added must be adjacent with each other. It is
55 not possible to add components incrementally to the default directory layout,
56 since the entire default layout can be replaced with one
60 .B lfs setstripe --component-del \fR{\fB--component-id\fR|\fB-I \fIcomp_id\fR | \
61 \fB--component-flags \fIcomp_flags\fR} <\fIfilename\fR>
63 Remove the component(s) specified by component ID or flags from an existing
64 file. The ID specified by the
66 option is the numerical unique ID of the component, it can be obtained using
69 command. It is not possible to delete components from a default directory
70 layout, since the entire default layout can be replaced with one
73 The \fB--component-flags\fR option is used to specify certain type of
74 components, such as all instantiated ones.
76 .B lfs setstripe -d \fR<\fIdirectory\fR>
78 Delete the default layout on the specified directory. It is not necessary
79 to delete the default layout on a directory before replacing it. This is
80 only needed if the directory should revert from a directory-specific layout
81 to using the global filesystem default layout stored on the root directory.
83 The various stripe related options are listed and explained below:
85 .B -c\fR, \fB--stripe-count \fR<\fIstripe_count\fR>
86 The number of OSTs to stripe a file over. \fB0 \fRmeans to use the
87 filesystem-wide default stripe count (default 1), and \fB-1 \fRmeans to stripe
88 over all available OSTs.
90 .B -S\fR, \fB--stripe-size \fR<\fIstripe_size\fR>
91 The number of bytes to store on each OST before moving to the next OST. \fB0\fR
92 means to use the filesystem-wide default stripe_size (default 1MB).
94 .B -i\fR, \fB--stripe-index \fR<\fIstart_ost_index\fR>
95 The OST index (starting at 0) on which to start striping for this file. \fB-1\fR
96 allows the MDS to choose the starting index and it is strongly recommended, as
97 this allows space and load balancing to be done by the MDS as needed.
99 .B -o\fR, \fB--ost-list \fR<\fIost_indices\fR>
100 Used to specify the exact stripe layout on the file system. \fIost_indices\fR
101 is a list of OSTs referenced by their indices, which are specified in decimal
102 or hex form and can be obtained using the
104 command. The list format consists of individual OST indices and index ranges
105 separated by commas, e.g. 1,2-4,7. The
107 option may be specified multiple times to stripe across the union of all listed
110 option is combined with
114 must agree with the number of OSTs in
118 option is combined with
122 must be in the OST list, and it will be used as the index on which to start
123 striping the file. Otherwise the striping will occur in the order specified in
126 .B -p\fR, \fB--pool \fR<\fIpool_name\fR>
127 The name of a predefined pool of OSTs (see
129 that will be used for striping. The
134 will be used as well; the
136 must be part of the pool or an error will be returned.
138 There are two options available only for \fBlfs migrate\fR:
141 Block file access during data migration (default).
144 Abort migrations if concurrent access is detected.
145 .SH COMPONENT_OPTIONS
146 The various component related options are listed and explained below:
148 .B -E\fR,\fB--component-end \fR< \fIend\fR>
149 The end offset of the component,
151 is specified in bytes, or using a suffix (kMGTP),
152 such as 256M. \fB-1\fR means the end of file.
154 .B -I\fR, \fB--component-id \fR<\fIcomp_id\fR>
155 The numerical unique component id.
157 .B --component-flags \fR<\fIflags\fR>
158 Component flags. Available \fIflags\fR:
161 .B init\fR: instantiated component.
164 .B ^init\fR: uninstantiated component.
169 Add specified components to an existing composite file.
172 Delete specified the components from an existing file. Deletion must start
173 with the last component.
176 .B $ lfs setstripe -S 128k -c 2 /mnt/lustre/file1
177 This creates a file striped on two OSTs with 128kB on each stripe.
179 .B $ lfs setstripe -d /mnt/lustre/dir
180 This deletes a default stripe pattern on dir. New files created in that
181 directory will use the filesystem global default instead.
183 .B $ lfs setstripe -E 4M -c 1 -E 64M -c 4 -E -1 -c -1 /mnt/lustre/file1
184 This creates a file with composite layout, the component has 1 stripe and \
185 covers [0, 4M), the second component has 4 stripes and covers [4M, 64M), the \
186 last component stripes over all available OSTs and covers [64M, EOF).
188 .B $ lfs setstripe --component-add -E -1 -c 4 /mnt/lustre/file1
189 This add a component which start from the end of last existing component to \
192 .B $ lfs setstripe --component-del -I 1 /mnt/lustre/file1
193 This deletes the component with ID equals 1 from an existing file.