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 There are two options available only for \fBlfs migrate\fR:
121 Block file access during data migration (default).
124 Abort migrations if concurrent access is detected.
125 .SH COMPONENT_OPTIONS
126 The various component related options are listed and explained below:
128 .B -E, --component-end <\fIend\fR>
129 The end offset of the component,
131 is specified in bytes, or using a suffix (kMGTP),
132 such as 256M. -1 means the end of file.
134 .B -I, --component-id <\fIcomp_id\fR>
135 The numerical unique component id.
137 .B --component-flags <\fIflags\fR>
138 Component flags. Available flags: \fBinit\fR: instantiated component.
139 \fB^init\fR: uninstantiated component.
142 Add specified components to an existing composite file.
145 Delete specified the components from an existing file. Deletion must start
146 with the last component.
149 .B $ lfs setstripe -S 128k -c 2 /mnt/lustre/file1
150 This creates a file striped on two OSTs with 128kB on each stripe.
152 .B $ lfs setstripe -d /mnt/lustre/dir
153 This deletes a default stripe pattern on dir. New files will use the default \
154 striping pattern created therein.
156 .B $ lfs setstripe -E 4M -c 1 -E 64M -c 4 -E -1 -c -1 /mnt/lustre/file1
157 This creates a file with composite layout, the component has 1 stripe and \
158 covers [0, 4M), the second component has 4 stripes and covers [4M, 64M), the \
159 last component stripes over all available OSTs and covers [64M, EOF).
161 .B $ lfs setstripe --component-add -E -1 -c 4 /mnt/lustre/file1
162 This add a component which start from the end of last existing component to \
165 .B $ lfs setstripe --component-del -I 1 /mnt/lustre/file1
166 This deletes the component with ID equals 1 from an existing file.