.SH NAME
lfs setdirstripe, mkdir \- set striping pattern of a directory.
.SH SYNOPSIS
-.B lfs setdirstripe [\fR-cdDHioT\fR] \fIDIR\fR...
+.B lfs setdirstripe [\fR-cdDHioTx\fR] \fIDIR\fR...
.br
.SH DESCRIPTION
Create a striped directory with specified striping pattern. This lfs utility
is similar to
.BR lfs setstripe
, but is used to create striped directory.
+Can also be used to create directory with a foreign (free format) striping pattern (see
+.BR --foreign
+and
+.BR --xattr
+options).
.B lfs mkdir
is an alias for this command.
.SH OPTIONS
.I COUNT
MDTs.
.TP
-.BR \-i ", " \-\-mdt\-index =\fISTART_MDT_INDEX\fR
+.BR \-i ", " \-\-mdt\-index =\fISTART_MDT_INDEX\fR[,\fIMDT_INDEX ...]
Use the MDT whose index is
.I START_MDT_INDEX
-as the master/starting MDT for the directory. If -1 (default) is set, it will randomly pick
+as the master/starting MDT for the directory. If multiple
+.I MDT_INDEX
+values are given, then the stripes will be allocated on the specified
+MDT indices. If index -1 (default) is used, it will randomly pick
.I COUNT
less full MDTs.
.TP
reasonably uniform, but not cryptographically strong,
hashing of the filename. (default)
.TP
+.B space
+This can only be set on plain directory default striping.
+Newly created sub-directories will be distributed on all
+MDTs by MDT space usage. Note that this is suggested to
+be set on lustre ROOT, so that all sub-directories under
+lustre ROOT are distributed among all MDTs.
+.TP
.B all_char
Sum of ASCII characters modulo number of MDTs. This
provides weak hashing of the filename, and is suitable
.BR chmod (1).
It is not affected by the current
.BR umask (1p).
+.TP
+.BR \-\-foreign[=type]
+Create a directory with a foreign (non-Lustre/free format, see
+.BR \-\-xattr
+option) striping. Where
+.BR type
+specifies a known foreign type (like
+.BR none
+,
+.BR daos
+, ...) or a 32-bit numeric type.
+.TP
+.BR \-\-flags =\fI<hex>\fR
+Specify a bitmask of flags.
+.TP
+.BR \-x ", " \-\-xattr =\fISTRING\fR
+Specify a string to be used as a foreign (free format) striping.
.SH NOTE
.PP
The
.B MDT0001
(MDT index 1), and whose hash type is
.BR all_char .
+.TP
+.B $ lfs mkdir --foreign=daos --xattr PUUID:CUUID /mnt/lustre/dir1
+This creates
+.B dir1
+with foreign (non-lustre/free format)
+.B PUUID:CUUID
+striping/LMV EA.
.SH AVAILABILITY
The
.B lfs setdirstripe