1 .TH LFS-SETDIRSTRIPE 1 2017-11-07 "Lustre" "Lustre Utilities"
3 lfs setdirstripe, mkdir \- set striping pattern of a directory.
5 .B lfs setdirstripe [\fR-cdDHioTx\fR] \fIDIR\fR...
8 Create a striped directory with specified striping pattern. This
10 sub-command is similar to
12 but is used to create a striped directory or set the default layout for
14 Can also be used to create directory with a foreign (free format) striping pattern (see
20 is an alias for this command.
23 .BR \-c ", " \-T ", " \-\-mdt\-count =\fICOUNT\fR
24 Stripe the new directory over
28 .BR \-i ", " \-\-mdt\-index =\fISTART_MDT_INDEX\fR[,\fIMDT_INDEX ...]
29 Use the MDT whose index is
31 as the master/starting MDT for the directory. If multiple
33 values are given, then the stripes will be allocated on the specified
34 MDT indices. If index -1 (default) is used, it will prefer to select
36 MDTs proportional to the free space and inodes on each.
38 .BR \-H ", " \-\-mdt-hash =\fIHASH_TYPE\fR
41 for the striped directory.
45 CRUSH hash algorithm. This is a consistent hash
46 algorithm, so minimum sub files need to relocate
47 during directory restripe.
50 Fowler-Noll-Vo (FNV-1a) hash algorithm. This provides
51 reasonably uniform, but not cryptographically strong,
52 hashing of the filename. (default)
55 Sum of ASCII characters modulo number of MDTs. This
56 provides weak hashing of the filename, and is suitable
57 for only testing or when the input is known to have
58 perfectly uniform distribution (e.g. sequential numbers).
61 .BR \-d ", " \-\-delete
62 Delete the default striping layout from the directory. New subdirectories
63 created in this directory will inherit the global default directory layout
64 (by default they will not be striped).
66 .BR \-D ", " \-\-default
67 Set the default striping pattern of subdirectories. Newly created
68 sub-directories will use the new default striping pattern,
69 but existing sub-directories will not be affected. The newly
70 created sub-directories will also inherit the specified default
71 striping pattern. Only default stripe count is supported for now.
73 Note that striping all directories across all MDTs by default is
75 recommended at this time, as the clients will have to do more RPCs to
76 create and access each directory, hurting performance rather than
77 improving it. Default striped directories are preferred for parent
79 where large subdirectories will be created (e.g. file-per-process
80 job output directories).
82 .BR \-o ", " \-\-mode =\fIMODE\fR
83 Set the file access permissions of the new directory to the specified
86 (typically octal), as with
88 It is not affected by the current
91 .BR \-\-foreign[=type]
92 Create a directory with a foreign (non-Lustre/free format, see
94 option) striping. Where
96 specifies a known foreign type (like
99 or a 32-bit numeric type.
101 .BR \-\-flags =\fI<hex>\fR
102 Specify a numeric bitmask of type-specific layout flags for the foreign layout.
104 .BR \-x ", " \-\-xattr =\fISTRING\fR
105 Specify a string to be used as a foreign (free format) striping.
116 and create the directory on an MDT that is less full than the others.
120 command is only usable by root unless the
121 .B "mdt.*.enable_remote_dir_gid"
122 is set on the MDS via
124 to be either a non-zero numeric GID to limit it to a single group (e.g. the
125 .BR "operator " or " admin"
128 to allow any user/group to create remote directories. By default, it is
130 to limit remote/striped directories to only the root user.
132 The root directory of the file system is on MDT0000, and directories and
133 files inherit the MDT of their parent directory unless a different MDT is
134 specified with this command.
136 By default, only directories on MDT0000 can contain directories that are not on
137 the same MDT. However, if
138 .B "mdt.*.enable_remote_dir"
139 is set non-zero on an MDT (the default)
140 then it will allow creating remote directories that have parents other than
141 MDT0000. This is restricted to avoid creating directory trees that have
142 intermediate path components on a series different MDTs and become unavailable
143 if any of the intermediate MDTs are offline.
146 .B $ lfs setdirstripe -c 2 -i 1 -H all_char /mnt/lustre/dir1
147 This creates a directory striped on two MDTs, whose first stripe is on
149 (MDT index 1), and whose hash type is
152 .B $ lfs mkdir --foreign=daos --xattr PUUID:CUUID /mnt/lustre/dir1
155 with foreign (non-lustre/free format)
161 command is part of the Lustre filesystem.
165 .BR lfs-getdirstripe (1),
166 .BR lfs-setstripe (1),