Whamcloud - gitweb
LU-5170 utils: Add support for --list-commands option
[fs/lustre-release.git] / lustre / doc / lfs-setdirstripe.1
1 .TH LFS-SETDIRSTRIPE 1 2014-06-08 "Lustre" "Lustre Utilities"
2 .SH NAME
3 lfs setdirstripe, mkdir \- set striping pattern of a directory.
4 .SH SYNOPSIS
5 .B lfs setdirstripe
6 [\fIOPTION\fR]... \fIDIR\fR...
7 .br
8 .SH DESCRIPTION
9 Create a striped directory with specified striping pattern. This lfs utility
10 is similar to
11 .B lfs setstripe
12 , but is used to create striped directory.
13 .B lfs mkdir
14 is an alias for this command.
15 .SH OPTIONS
16 .TP
17 \fB\-c\fR, \fB\-\-count\fR=\fICOUNT\fR
18 Stripe over
19 .I COUNT
20 MDTs.
21 .TP
22 \fB\-i\fR, \fB\-\-index\fR=\fISTART_MDT_INDEX\fR
23 Stripe from the MDT, whose index is
24 .I START_MDT_INDEX.
25 .TP
26 \fB\-t\fR, \fB\-\-hash\-type\fR=\fIHASH_TYPE\fR
27 the hash_type of the striped directory.
28 .RS 1.2i
29 .TP
30 .B fnv_1a_64
31 Fowler-Noll-Vo (FNV-1a) hash algorithm.  This provides
32 reasonably uniform, but not cryptographically strong,
33 hashing of the filename. (default)
34 .TP
35 .B all_char
36 Sum of ASCII characters modulo number of MDTs. This
37 provides weak hashing of the filename, and is suitable
38 for only testing or when the input is known to have
39 perfectly uniform distribution (e.g. sequential numbers).
40 .RE
41 .TP
42 .B \-D, \-\-default_stripe
43 Set the default striping pattern of the directory. Newly created
44 sub-directories will use the new default striping pattern,
45 but existing sub-directories will not be affected.  The newly
46 created sub-directories will also inherit the current default
47 striping pattern. Only default stripe count is supported for now.
48 .TP
49 \fB\-m\fR, \fB\-\-mode\fR=\fIMODE\fR
50 Set the file access mode of the new directory to the specified
51 numeric value (typically octal) as specified in
52 .BR chmod (1),
53 and is not affected by the current
54 .BR umask (1p).
55 .SH NOTE
56 .PP
57 The "lfs setdirstripe" command is only executable by root unless
58 "mdt.*.enable_remote_dir_gid" is set via "lctl set_param" to be either a
59 non-zero GID to limit it to a single group (e.g. "operator" or "admin"),
60 or "-1" to allow any group to create remote directories.
61
62 The root of the file system is on MDT0000, and directories and files inherit the
63 MDT of their parent directory unless a different MDT is specified with this
64 command.
65
66 By default, only directories on MDT0000 can contain directories that are not on
67 the same MDT.  However, if "mdt.*.enable_remote_dir" is set non-zero on an MDT
68 then it will allow creating remote directories that have parents other than
69 MDT0000. This is restricted to avoid creating directory trees that have
70 intermediate path components on a series different MDTs and become unavailable
71 if any of the intermediate MDTs are offline.
72 .SH EXAMPLES
73 .TP
74 .B $ lfs setdirstripe -c 2 -i 1 -t all_char /mnt/lustre/dir1
75 This creates a directory striped on two MDTs, whose first stripe is on
76 .B MDT0001
77 (MDT index 1), and whose hash type is
78 .BR all_char .
79 .SH BUGS
80 Default stripe cannot be deleted once it is set.
81 .SH AVAILABILITY
82 The lfs setdirstripe command is part of the Lustre filesystem.
83 .SH SEE ALSO
84 .BR lfs (1),
85 .BR lfs-getdirstripe (1),
86 .BR lfs-setstripe (1),
87 .BR lustre (7)