- <para>For more information, see <literal>man lfs-migrate</literal></para>
- <warning><para>Currently, only whole directories can be migrated
- between MDTs. During migration each file receives a new identifier
- (FID). As a consequence, the file will report a new inode number. Some
- system tools (for example, backup and archiving tools) may consider
- the migrated files to be new, even though the contents are unchanged.
- </para></warning>
+ <para>For more information, see <literal>man lfs-migrate</literal>.
+ </para>
+ <warning><para>During migration each file receives a new identifier
+ (FID). As a consequence, the file will report a new inode number to
+ userspace applications. Some system tools (for example, backup and
+ archiving tools, NFS, Samba) that identify files by inode number may
+ consider the migrated files to be new, even though the contents are
+ unchanged. If a Lustre system is re-exporting to NFS, the migrated
+ files may become inaccessible during and after migration if the
+ client or server are caching a stale file handle with the old FID.
+ Restarting the NFS service will flush the local file handle cache,
+ but clients may also need to be restarted as they may cache stale
+ file handles as well.
+ </para></warning>
+ </section>
+ <section remap="h3" condition='l2C'>
+ <title><indexterm>
+ <primary>migrating metadata</primary>
+ </indexterm>Striped Directory Migration</title>
+ <para>Lustre 2.8 included a feature to migrate metadata (directories
+ and inodes therein) between MDTs, however it did not support migration
+ of striped directories, or changing the stripe count of an existing
+ directory. Lustre 2.12 adds support for migrating and restriping
+ directories. The <literal>lfs migrate -m</literal> command can only
+ only be performed on whole directories, though it will migrate both
+ the specified directory and its sub-entries recursively.
+ For example, to migrate the contents of a large directory
+ <literal>/testfs/largedir</literal> from its current location on
+ MDT0000 to MDT0001 and MDT0003, run the following command:</para>
+ <screen>$ lfs migrate -m 1,3 /testfs/largedir</screen>
+ <para>Metadata migration will migrate file dirent and inode to other
+ MDTs, but it won't touch file data. During migration, directory and
+ its sub-files can be accessed like normal ones, though the same
+ warning above applies to tools that depend on the file inode number.
+ Migration may fail for various reasons such as MDS restart, or disk
+ full. In those cases, some of the sub-files may have been migrated to
+ the new MDTs, while others are still on the original MDT. The files
+ can be accessed normally. The same <literal>lfs migrate -m</literal>
+ command should be executed again when these issues are fixed to finish
+ this migration. However, you cannot abort a failed migration, or
+ migrate to different MDTs from previous migration command.</para>
+ </section>