1 .TH LFS-SETSTRIPIE 1 2015-11-06 "Lustre" "Lustre Utilities"
3 lfs setstripe \- set striping pattern of a file.
5 .B lfs setstripe [\fISTRIPE_OPTIONS\fR] <directory|filename>
7 .B lfs setstripe -d <directory>
9 .B lfs setstripe <--component-end|-E end1> [\fISTRIPE_OPTIONS\fR] \
10 [<--component-end|-E end2> [\fISTRIPE_OPTIONS\fR] ...] <filename>
12 .B lfs setstripe --component-add <--component-end|-E end1> [\fISTRIPE_OPTIONS\fR] \
13 [<--component-end|-E end2> [\fISTRIPE_OPTIONS\fR] ...] <filename>
15 .B lfs setstripe --component-del <--component-id|-I comp_id | \
16 --component-flags comp_flags> <filename>
20 .B lfs setstripe [\fISTRIPE_OPTIONS\fR] <directory|filename>
21 Create a file with specified striping pattern, or set default stripping pattern
25 .B lfs setstripe -d <directory>
27 Delete the default striping on the specified directory.
29 .B lfs setstripe <--component-end|-E end1> [\fISTRIPE_OPTIONS\fR] \
30 [<--component-end|-E end2> [\fISTRIPE_OPTIONS\fR] ...] <filename>
32 Create a file with the specified composite layout. Each component defines the
33 stripe pattern of the file in the range of [start, end). The first component
34 must start from offset 0, and all components must be adjacent with each other,
35 no holes are allowed, so each extent will start at the end of previous extent.
38 option is used to specify the end offset of each component, and it also
39 indicates the following \fISTRIPE_OPTIONS\fR are for this component. A -1 end
40 offset indicates the EOF.
42 .B lfs setstripe --component-add <--component-end|-E end1> [\fISTRIPE_OPTIONS\fR] \
43 [<--component-end|-E end2> [\fISTRIPE_OPTIONS\fR] ...] <filename>
45 Add components to an existing composite file. The extent start of the first
46 component to be added is equal to the extent end of last component in existing
47 file, and all components to be added must be adjacent with each other.
49 .B lfs setstripe --component-del <--component-id|-I comp_id | \
50 --component-flags comp_flags> <filename>
52 Remove the component(s) specified by component ID or flags from an existing
53 file. The ID specified by
55 option is the numerical unique ID of the component, it can be obtained using
60 option is used to specify certain type of components, such as all instantiated
63 The various stripe related options are listed and explained below:
65 .B -c, --stripe-count <\fIstripe_count\fR>
66 The number of OSTs to stripe a file over. 0 means to use the filesystem-wide
67 default stripe count (default 1), and -1 means to stripe over all available
70 .B -S, --stripe-size <\fIstripe_size\fR>
71 The number of bytes to store on each OST before moving to the next OST. 0 means
72 to use the filesystem-wide default stripe_size (default 1MB).
74 .B -i, --stripe-index <\fIstart_ost_index\fR>
75 The OST index (starting at 0) on which to start striping for this file. -1
76 allows the MDS to choose the starting index and it is strongly recommended, as
77 this allows space and load balancing to be done by the MDS as needed.
79 .B -o, --ost-list <\fIost_indices\fR>
80 Used to specify the exact stripe layout on the file system. \fIost_indices\fR
81 is a list of OSTs referenced by their indices, which are specified in decimal
82 or hex form and can be obtained using the
84 command. The list format consists of individual OST indices and index ranges
85 separated by commas, e.g. 1,2-4,7. The
87 option may be specified multiple times to stripe across the union of all listed
90 option is combined with
94 must agree with the number of OSTs in
98 option is combined with
102 must be in the OST list, and it will be used as the index on which to start
103 striping the file. Otherwise the striping will occur in the order specified in
106 .B -p, --pool <\fIpool_name\fR>
107 The name of a predefined pool of OSTs (see
109 that will be used for striping. The
114 will be used as well; the
116 must be part of the pool or an error will be returned.
118 .B -L, --layout <\fIlayout type\fB>\fR
119 The type of stripe layout, can be
120 .BR raid0 ", " released " or " mdt ".
125 type allows place the first component of the file on the MDT where the inode
126 is located. This is used with composite file layouts and can be defined as
127 first component only. The
129 of MDT part is always equal to the component size. There is also per-MDT
131 .IR lod.dom_stripesize
132 to limit maximum size of DoM stripe which can be changed with
135 .IR lctl\ set_param\ lod.*.dom_stripesize=0
139 There are two options available only for \fBlfs migrate\fR:
142 Block file access during data migration (default).
145 Abort migrations if concurrent access is detected.
146 .SH COMPONENT_OPTIONS
147 The various component related options are listed and explained below:
149 .B -E, --component-end <\fIend\fR>
150 The end offset of the component,
152 is specified in bytes, or using a suffix (kMGTP),
153 such as 256M. -1 means the end of file.
155 .B -I, --component-id <\fIcomp_id\fR>
156 The numerical unique component id.
158 .B --component-flags <\fIflags\fR>
159 Component flags. Available flags: \fBinit\fR: instantiated component.
160 \fB^init\fR: uninstantiated component.
163 Add specified components to an existing composite file.
166 Delete specified the components from an existing file. Deletion must start
167 with the last component.
170 .B $ lfs setstripe -S 128k -c 2 /mnt/lustre/file1
171 This creates a file striped on two OSTs with 128kB on each stripe.
173 .B $ lfs setstripe -d /mnt/lustre/dir
174 This deletes a default stripe pattern on dir. New files will use the default \
175 striping pattern created therein.
177 .B $ lfs setstripe -E 4M -c 1 -E 64M -c 4 -E -1 -c -1 /mnt/lustre/file1
178 This creates a file with composite layout, the component has 1 stripe and \
179 covers [0, 4M), the second component has 4 stripes and covers [4M, 64M), the \
180 last component stripes over all available OSTs and covers [64M, EOF).
182 .B $ lfs setstripe --component-add -E -1 -c 4 /mnt/lustre/file1
183 This add a component which start from the end of last existing component to \
186 .B $ lfs setstripe --component-del -I 1 /mnt/lustre/file1
187 This deletes the component with ID equals 1 from an existing file.
189 .B $ lfs setstripe -E 1M -L mdt -E -1 /mnt/lustre/file1
190 This created file with Data-on-MDT layout. The first 1M is placed on MDT and \
191 rest of file is placed on OST with default striping.