+ <title>
+ <indexterm>
+ <primary>operations</primary>
+ <secondary>remote directory</secondary>
+ </indexterm>Creating a sub-directory on a given MDT</title>
+ <para>Lustre 2.4 enables individual sub-directories to be serviced by
+ unique MDTs. An administrator can allocate a sub-directory to a given MDT
+ using the command:</para>
+ <screen>
+client# lfs mkdir –i
+<replaceable>mdt_index</replaceable>
+<replaceable>/mount_point/remote_dir</replaceable>
+</screen>
+ <para>This command will allocate the sub-directory
+ <literal>remote_dir</literal> onto the MDT of index
+ <literal>mdt_index</literal>. For more information on adding additional MDTs
+ and
+ <literal>mdt_index</literal> see
+ <xref linkend='dbdoclet.addmdtindex' />.</para>
+ <warning>
+ <para>An administrator can allocate remote sub-directories to separate
+ MDTs. Creating remote sub-directories in parent directories not hosted on
+ MDT0 is not recommended. This is because the failure of the parent MDT
+ will leave the namespace below it inaccessible. For this reason, by
+ default it is only possible to create remote sub-directories off MDT0. To
+ relax this restriction and enable remote sub-directories off any MDT, an
+ administrator must issue the following command on the MGS:
+ <screen>mgs# lctl conf_param <replaceable>fsname</replaceable>.mdt.enable_remote_dir=1</screen>
+ For Lustre filesystem 'scratch', the command executed is:
+ <screen>mgs# lctl conf_param scratch.mdt.enable_remote_dir=1</screen>
+ To verify the configuration setting execute the following command on any
+ MDS:
+ <screen>mds# lctl get_param mdt.*.enable_remote_dir</screen></para>
+ </warning>
+ <para condition='l28'>With Lustre software version 2.8, a new
+ tunable is available to allow users with a specific group ID to create
+ and delete remote and striped directories. This tunable is
+ <literal>enable_remote_dir_gid</literal>. For example, setting this
+ parameter to the 'wheel' or 'admin' group ID allows users with that GID
+ to create and delete remote and striped directories. Setting this
+ parameter to <literal>-1</literal> on MDT0 to permanently allow any
+ non-root users create and delete remote and striped directories.
+ On the MGS execute the following command:
+ <screen>mgs# lctl conf_param <replaceable>fsname</replaceable>.mdt.enable_remote_dir_gid=-1</screen>
+ For the Lustre filesystem 'scratch', the commands expands to:
+ <screen>mgs# lctl conf_param scratch.mdt.enable_remote_dir_gid=-1</screen>.
+ The change can be verified by executing the following command on every MDS:
+ <screen>mds# lctl get_param mdt.<replaceable>*</replaceable>.enable_remote_dir_gid</screen>
+ </para>
+ </section>
+ <section xml:id="dbdoclet.lfsmkdirdne2" condition='l28'>
+ <title>
+ <indexterm>
+ <primary>operations</primary>
+ <secondary>striped directory</secondary>
+ </indexterm>
+ <indexterm>
+ <primary>operations</primary>
+ <secondary>mkdir</secondary>
+ </indexterm>
+ <indexterm>
+ <primary>operations</primary>
+ <secondary>setdirstripe</secondary>
+ </indexterm>
+ <indexterm>
+ <primary>striping</primary>
+ <secondary>metadata</secondary>
+ </indexterm>Creating a directory striped across multiple MDTs</title>
+ <para>The Lustre 2.8 DNE feature enables individual files in a given
+ directory to store their metadata on separate MDTs (a <emphasis>striped
+ directory</emphasis>) once additional MDTs have been added to the
+ filesystem, see <xref linkend="dbdoclet.addingamdt"/>.
+ The result of this is that metadata requests for
+ files in a striped directory are serviced by multiple MDTs and metadata
+ service load is distributed over all the MDTs that service a given
+ directory. By distributing metadata service load over multiple MDTs,
+ performance can be improved beyond the limit of single MDT
+ performance. Prior to the development of this feature all files in a
+ directory must record their metadata on a single MDT.</para>
+ <para>This command to stripe a directory over
+ <replaceable>mdt_count</replaceable> MDTs is:
+ </para>
+ <screen>
+client# lfs mkdir -c
+<replaceable>mdt_count</replaceable>
+<replaceable>/mount_point/new_directory</replaceable>
+</screen>
+ <para>The striped directory feature is most useful for distributing
+ single large directories (50k entries or more) across multiple MDTs,
+ since it incurs more overhead than non-striped directories.</para>