Whamcloud - gitweb
LU-7501 utils: clean up lfs argument handling/docs
[fs/lustre-release.git] / lustre / doc / lfs-setdirstripe.1
1 .TH LFS-SETDIRSTRIPE 1 2017-11-07 "Lustre" "Lustre Utilities"
2 .SH NAME
3 lfs setdirstripe, mkdir \- set striping pattern of a directory.
4 .SH SYNOPSIS
5 .B lfs setdirstripe [\fR-cdDHioT\fR] \fIDIR\fR...
6 .br
7 .SH DESCRIPTION
8 Create a striped directory with specified striping pattern. This lfs utility
9 is similar to
10 .BR lfs setstripe
11 , but is used to create striped directory.
12 .B lfs mkdir
13 is an alias for this command.
14 .SH OPTIONS
15 .TP
16 .BR \-c ", " \-T ", " \-\-mdt\-count =\fICOUNT\fR
17 Stripe the new directory over
18 .I COUNT
19 MDTs.
20 .TP
21 .BR \-i ", " \-\-mdt\-index =\fISTART_MDT_INDEX\fR
22 Use the MDT whose index is
23 .I START_MDT_INDEX
24 as the master/starting MDT for the directory.
25 .TP
26 .BR \-H ", " \-\-mdt-hash =\fIHASH_TYPE\fR
27 Use
28 .I hash_type
29 for the striped directory.
30 .RS 1.2i
31 .TP
32 .B fnv_1a_64
33 Fowler-Noll-Vo (FNV-1a) hash algorithm.  This provides
34 reasonably uniform, but not cryptographically strong,
35 hashing of the filename. (default)
36 .TP
37 .B all_char
38 Sum of ASCII characters modulo number of MDTs. This
39 provides weak hashing of the filename, and is suitable
40 for only testing or when the input is known to have
41 perfectly uniform distribution (e.g. sequential numbers).
42 .RE
43 .TP
44 .BR \-d ", " \-\-delete
45 Delete the default striping layout from the directory.  New subdirectories
46 created in this directory will inherit the global default directory layout
47 (by default they will not be striped).
48 .TP
49 .BR \-D ", " \-\-default
50 Set the default striping pattern of subdirectories. Newly created
51 sub-directories will use the new default striping pattern,
52 but existing sub-directories will not be affected.  The newly
53 created sub-directories will also inherit the specified default
54 striping pattern. Only default stripe count is supported for now.
55
56 Note that striping all directories across all MDTs by default is not
57 recommended at this time, as the clients will have to do more RPCs to
58 create and access each directory, hurting performance rather than
59 improving it.  Default striped directories are preferred for cases
60 where large subdirectories will be created (e.g. file-per-process
61 job output directories).
62 .TP
63 .BR \-o ", " \-\-mode =\fIMODE\fR
64 Set the file access permissions of the new directory to the specified
65 numeric
66 .I MODE
67 (typically octal), as with
68 .BR chmod (1).
69 It is not affected by the current
70 .BR umask (1p).
71 .SH NOTE
72 .PP
73 The
74 .B lfs setdirstripe
75 command is only executable by root unless
76 .B "mdt.*.enable_remote_dir_gid"
77 is set on the MDS via
78 .B lctl set_param
79 to be either a non-zero GID to limit it to a single group
80 (e.g. "operator" or "admin"), or "-1" to allow any group
81 to create remote directories.
82
83 The root of the file system is on MDT0000, and directories and files inherit the
84 MDT of their parent directory unless a different MDT is specified with this
85 command.
86
87 By default, only directories on MDT0000 can contain directories that are not on
88 the same MDT.  However, if "mdt.*.enable_remote_dir" is set non-zero on an MDT
89 then it will allow creating remote directories that have parents other than
90 MDT0000. This is restricted to avoid creating directory trees that have
91 intermediate path components on a series different MDTs and become unavailable
92 if any of the intermediate MDTs are offline.
93 .SH EXAMPLES
94 .TP
95 .B $ lfs setdirstripe -c 2 -i 1 -H all_char /mnt/lustre/dir1
96 This creates a directory striped on two MDTs, whose first stripe is on
97 .B MDT0001
98 (MDT index 1), and whose hash type is
99 .BR all_char .
100 .SH AVAILABILITY
101 The
102 .B lfs setdirstripe
103 command is part of the Lustre filesystem.
104 .SH SEE ALSO
105 .BR lctl (8),
106 .BR lfs (1),
107 .BR lfs-getdirstripe (1),
108 .BR lfs-setstripe (1),
109 .BR lustre (7)