+ <section xml:id="backup_fs_level.index_objects" condition="l2B">
+ <title>
+ <indexterm>
+ <primary>backup</primary>
+ <secondary>index objects</secondary>
+ </indexterm>Backing Up an OST or MDT (Backend File System Level)</title>
+ <para>Prior to Lustre software release 2.11.0, we can only do the backend
+ file system level backup and restore process for ldiskfs-based systems.
+ The ability to perform a zfs-based MDT/OST file system level backup and
+ restore is introduced beginning in Lustre software release 2.11.0.
+ Differing from an ldiskfs-based system, index objects must be backed up
+ before the unmount of the target (MDT or OST) in order to be able to
+ restore the file system successfully. To enable index backup on the
+ target, execute the following command on the target server:</para>
+ <screen># lctl set_param osd-*.${fsname}-${target}.index_backup=1</screen>
+ <para><replaceable>${target}</replaceable> is composed of the target type
+ (MDT or OST) plus the target index, such as <literal>MDT0000</literal>,
+ <literal>OST0001</literal>, and so on.</para>
+ <note><para>The index_backup is also valid for an ldiskfs-based system,
+ that will be used when migrating data between ldiskfs-based and
+ zfs-based systems as described in <xref linkend="migrate_backends"/>.
+ </para></note>
+ </section>
+ <section xml:id="backup_fs_level.ost_mdt">
+ <title>
+ <indexterm>
+ <primary>backup</primary>
+ <secondary>OST and MDT</secondary>
+ </indexterm>Backing Up an OST or MDT</title>
+ <para>The below examples show backing up an OST filesystem. When backing
+ up an MDT, substitute <literal>mdt</literal> for <literal>ost</literal>
+ in the instructions below.</para>
+ <orderedlist>
+ <listitem>
+ <para><emphasis role="bold">Umount the target</emphasis></para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Make a mountpoint for the file system.
+ </emphasis></para>
+ <screen>[oss]# mkdir -p /mnt/ost</screen>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Mount the file system.</emphasis></para>
+ <para>For ldiskfs-based systems:</para>
+ <screen>[oss]# mount -t ldiskfs /dev/<emphasis>{ostdev}</emphasis> /mnt/ost</screen>
+ <para>For zfs-based systems:</para>
+ <orderedlist>
+ <listitem>
+ <para>Import the pool for the target if it is exported. For example:
+ <screen>[oss]# zpool import lustre-ost [-d ${ostdev_dir}]</screen>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Enable the <literal>canmount</literal> property on the target
+ filesystem. For example:
+ <screen>[oss]# zfs set canmount=on ${fsname}-ost/ost</screen>
+ You also can specify the mountpoint property. By default, it will
+ be: <literal>/${fsname}-ost/ost</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Mount the target as 'zfs'. For example:
+ <screen>[oss]# zfs mount ${fsname}-ost/ost</screen>
+ </para>
+ </listitem>
+ </orderedlist>