<screen># lctl --device lustre-MDT0000 changelog_register lustre-MDT0000 Registered\
changelog userid 'cl1'</screen>
<para>Synchronize a Lustre file system (<literal>/mnt/lustre</literal>) to a target file system (<literal>/mnt/target</literal>).</para>
- <screen>$ lustre_rsync --source=/mnt/lustre --target=/mnt/target --mdt=lustre-MDT00\
-00 --user=cl1 --statuslog sync.log --verbose
+ <screen>$ lustre_rsync --source=/mnt/lustre --target=/mnt/target --mdt=lustre-MDT0000 \
+--user=cl1 --statuslog sync.log --verbose
Lustre filesystem: lustre
MDT device: lustre-MDT0000
Source: /mnt/lustre
<listitem>
<para>Format the LVM volumes as Lustre targets.</para>
<para>In this example, the backup file system is called 'main' and designates the current, most up-to-date backup.</para>
- <screen>cfs21:~# mkfs.lustre --mdt --fsname=main /dev/volgroup/MDT
+ <screen>cfs21:~# mkfs.lustre --fsname=main --mdt --index=0 /dev/volgroup/MDT
No management node specified, adding MGS to this MDT.
Permanent disk data:
- Target: main-MDTffff
- Index: unassigned
+ Target: main-MDT0000
+ Index: 0
Lustre FS: main
Mount type: ldiskfs
Flags: 0x75
- (MDT MGS needs_index first_time update )
+ (MDT MGS first_time update )
Persistent mount opts: errors=remount-ro,iopen_nopriv,user_xattr
Parameters:
checking for existing Lustre data
target name main-MDTffff
4k blocks 0
options -i 4096 -I 512 -q -O dir_index -F
- mkfs_cmd = mkfs.ext2 -j -b 4096 -L main-MDTffff -i 4096 -I 512 -q -O dir_\
-index -F /dev/volgroup/MDT
+ mkfs_cmd = mkfs.ext2 -j -b 4096 -L main-MDTffff -i 4096 -I 512 -q
+ -O dir_index -F /dev/volgroup/MDT
Writing CONFIGS/mountdata
-cfs21:~# mkfs.lustre --ost --mgsnode=cfs21 --fsname=main /dev/volgroup/OST0
+cfs21:~# mkfs.lustre --mgsnode=cfs21 --fsname=main --ost --index=0 /dev/volgroup/OST0
Permanent disk data:
- Target: main-OSTffff
-Index: unassigned
+ Target: main-OST0000
+ Index: 0
Lustre FS: main
Mount type: ldiskfs
Flags: 0x72
- (OST needs_index first_time update )
+ (OST first_time update )
Persistent mount opts: errors=remount-ro,extents,mballoc
Parameters: mgsnode=192.168.0.21@tcp
checking for existing Lustre data
device size = 200MB
formatting backing filesystem ldiskfs on /dev/volgroup/OST0
- target name main-OSTffff
+ target name main-OST0000
4k blocks 0
options -I 256 -q -O dir_index -F
- mkfs_cmd = mkfs.ext2 -j -b 4096 -L main-OSTffff -I 256 -q -O dir_index -F\
- /dev/ volgroup/OST0
+ mkfs_cmd = mkfs.ext2 -j -b 4096 -L lustre-OSTffff -J size=400 -I 256
+ -i 262144 -O extents,uninit_bg,dir_nlink,huge_file,flex_bg -G 256
+ -E resize=4290772992,lazy_journal_init, -F /dev/volgroup/OST0
Writing CONFIGS/mountdata
cfs21:~# mount -t lustre /dev/volgroup/MDT /mnt/mdt
cfs21:~# mount -t lustre /dev/volgroup/OST0 /mnt/ost
<listitem>
<para>Rename the LVM snapshot.</para>
<para>Rename the file system snapshot from "main" to "back" so you can mount it without unmounting "main". This is recommended, but not required. Use the <literal>--reformat</literal> flag to <literal>tunefs.lustre</literal> to force the name change. For example:</para>
- <screen>cfs21:~# tunefs.lustre --reformat --fsname=back --writeconf /dev/volgroup/M\
-DTb1
+ <screen>cfs21:~# tunefs.lustre --reformat --fsname=back --writeconf /dev/volgroup/MDTb1
checking for existing Lustre data
found Lustre data
Reading CONFIGS/mountdata
Persistent mount opts: errors=remount-ro,iopen_nopriv,user_xattr
Parameters:
Writing CONFIGS/mountdata
-cfs21:~# tunefs.lustre --reformat --fsname=back --writeconf /dev/volgroup/O\
-STb1
+cfs21:~# tunefs.lustre --reformat --fsname=back --writeconf /dev/volgroup/OSTb1
checking for existing Lustre data
found Lustre data
Reading CONFIGS/mountdata
Persistent mount opts: errors=remount-ro,extents,mballoc
Parameters: mgsnode=192.168.0.21@tcp
Writing CONFIGS/mountdata
-When renaming an FS, we must also erase the last_rcvd file from the snapsho\
-ts
+When renaming an FS, we must also erase the last_rcvd file from the snapshots
cfs21:~# mount -t ldiskfs /dev/volgroup/MDTb1 /mnt/mdtback
cfs21:~# rm /mnt/mdtback/last_rcvd
cfs21:~# umount /mnt/mdtback
<listitem>
<para>Mount the file system from the LVM snapshot.</para>
<para>For example:</para>
- <screen>cfs21:~# mount -t lustre /dev/volgroup/MDTb1 /mnt/mdtback \
+ <screen>cfs21:~# mount -t lustre /dev/volgroup/MDTb1 /mnt/mdtback
cfs21:~# mount -t lustre /dev/volgroup/OSTb1 /mnt/ostback
cfs21:~# mount -t lustre cfs21:/back /mnt/back</screen>
<orderedlist>
<listitem>
<para>Create a combined MGS/MDT file system on a block device. On the MDS node, run:</para>
- <screen>mkfs.lustre --fsname=<<emphasis>fsname</emphasis>> --mgs --mdt <<emphasis>block device name</emphasis>></screen>
+ <screen>mkfs.lustre --fsname=<<emphasis>fsname</emphasis>> --mgs --mdt --index=0 <<emphasis>block device name</emphasis>></screen>
<para>The default file system name (<literal>fsname</literal>) is <literal>lustre</literal>.</para>
<note>
<para>If you plan to generate multiple file systems, the MGS should be created separately on its own dedicated block device, by running:</para>
</listitem>
<listitem xml:id="dbdoclet.50438267_pgfId-1290915">
<para>Create the OST. On the OSS node, run:</para>
- <screen>mkfs.lustre --ost --fsname=<<emphasis>fsname</emphasis>> --mgsnode=<<emphasis>NID</emphasis>> <<emphasis>block device name</emphasis>></screen>
+ <screen>mkfs.lustre --fsname=<<emphasis>fsname</emphasis>> --mgsnode=<<emphasis>NID</emphasis>> --ost --index=<<emphasis>OST index</emphasis>> <<emphasis>block device name</emphasis>></screen>
<para>When you create an OST, you are formatting a <literal>ldiskfs</literal> file system on a block storage device like you would with any local file system.</para>
<para>You can have as many OSTs per OSS as the hardware or drivers allow. For more information about storage and memory requirements for a Lustre file system, see <xref linkend="settinguplustresystem"/>.</para>
<para>You can only configure one OST per block device. You should create an OST that uses the raw block device and does not use partitioning.</para>
+ <para>You should specify the OST index number at format time in order to simplify the translating the OST number in error messages or file striping to the OSS node and block device later on.</para>
<para>If you are using block devices that are accessible from multiple OSS nodes, ensure that you mount the OSTs from only one OSS node at at time. It is strongly recommended that multiple-mount protection be enabled for such devices to prevent serious data corruption. For more information about multiple-mount protection, see <xref linkend="managingfailover"/>.</para>
<note>
- <para>Lustre currently supports block devices up to 16 TB on OEL 5/RHEL 5 (up to 8 TB on other distributions). If the device size is only slightly larger that 16 TB, it is recommended that you limit the file system size to 16 TB at format time. If the size is significantly larger than 16 TB, you should reconfigure the storage into devices smaller than 16 TB. We recommend that you not place partitions on top of RAID 5/6 block devices due to negative impacts on performance.</para>
+ <para>Lustre currently supports block devices up to 128 TB on RHEL 5/6 (up to 8 TB on other distributions). If the device size is only slightly larger that 16 TB, it is recommended that you limit the file system size to 16 TB at format time. We recommend that you not place DOS partitions on top of RAID 5/6 block devices due to negative impacts on performance, but instead format the whole disk for the filesystem.</para>
</note>
</listitem>
<listitem xml:id="dbdoclet.50438267_pgfId-1293955">
<screen>mount -t lustre <emphasis><block device name> <mount point></emphasis></screen>
<note>
<para>
- To create additional OSTs, repeat <xref linkend="dbdoclet.50438267_pgfId-1290915"/>Step 3 and <xref linkend="dbdoclet.50438267_pgfId-1293955"/>Step 4.</para>
+ To create additional OSTs, repeat <xref linkend="dbdoclet.50438267_pgfId-1290915"/>Step 3 and <xref linkend="dbdoclet.50438267_pgfId-1293955"/>Step 4, specifying the next higher OST index number.</para>
</note>
</listitem>
<listitem xml:id="dbdoclet.50438267_pgfId-1290934">
<orderedlist>
<listitem>
<para>Create a combined MGS/MDT file system on the block device. On the MDS node, run:</para>
- <screen>[root@mds /]# mkfs.lustre --fsname=temp --mgs --mdt /dev/sdb</screen>
+ <screen>[root@mds /]# mkfs.lustre --fsname=temp --mgs --mdt --index=0 /dev/sdb</screen>
<para>This command generates this output:</para>
<screen> Permanent disk data:
-Target: temp-MDTffff
-Index: unassigned
+Target: temp-MDT0000
+Index: 0
Lustre FS: temp
Mount type: ldiskfs
Flags: 0x75
- (MDT MGS needs_index first_time update )
+ (MDT MGS first_time update )
Persistent mount opts: errors=remount-ro,iopen_nopriv,user_xattr
Parameters: mdt.group_upcall=/usr/sbin/l_getgroups
<orderedlist>
<listitem>
<para>Create <literal>ost1</literal>. On <literal>oss1</literal> node, run:</para>
- <screen>[root@oss1 /]# mkfs.lustre --ost --fsname=temp --mgsnode=10.2.0.1@tcp0 /dev/sdc</screen>
+ <screen>[root@oss1 /]# mkfs.lustre --fsname=temp --mgsnode=10.2.0.1@tcp0 --ost --index=0 /dev/sdc</screen>
<para>The command generates this output:</para>
<screen> Permanent disk data:
-Target: temp-OSTffff
-Index: unassigned
+Target: temp-OST0000
+Index: 0
Lustre FS: temp
Mount type: ldiskfs
Flags: 0x72
-(OST needs_index first_time update)
+(OST first_time update)
Persistent mount opts: errors=remount-ro,extents,mballoc
Parameters: mgsnode=10.2.0.1@tcp
device size = 16MB
2 6 18
formatting backing filesystem ldiskfs on /dev/sdc
- target name temp-OSTffff
+ target name temp-OST0000
4k blocks 0
options -I 256 -q -O dir_index,uninit_groups -F
-mkfs_cmd = mkfs.ext2 -j -b 4096 -L temp-OSTffff -I 256 -q -O
+mkfs_cmd = mkfs.ext2 -j -b 4096 -L temp-OST0000 -I 256 -q -O
dir_index,uninit_groups -F /dev/sdc
Writing CONFIGS/mountdata </screen>
</listitem>
<orderedlist>
<listitem>
<para>Create ost2. On <literal>oss2</literal> node, run:</para>
- <screen>[root@oss2 /]# mkfs.lustre --ost --fsname=temp --mgsnode=10.2.0.1@tcp0 /dev\
-/sdd</screen>
+ <screen>[root@oss2 /]# mkfs.lustre --fsname=temp --mgsnode=10.2.0.1@tcp0 \
+--ost --index=1 /dev/sdd</screen>
<para>The command generates this output:</para>
<screen> Permanent disk data:
-Target: temp-OSTffff
-Index: unassigned
+Target: temp-OST0001
+Index: 1
Lustre FS: temp
Mount type: ldiskfs
Flags: 0x72
-(OST needs_index first_time update)
+(OST first_time update)
Persistent mount opts: errors=remount-ro,extents,mballoc
Parameters: mgsnode=10.2.0.1@tcp
device size = 16MB
2 6 18
formatting backing filesystem ldiskfs on /dev/sdd
- target name temp-OSTffff
+ target name temp-OST0001
4k blocks 0
options -I 256 -q -O dir_index,uninit_groups -F
-mkfs_cmd = mkfs.ext2 -j -b 4096 -L temp-OSTffff -I 256 -q -O
+mkfs_cmd = mkfs.ext2 -j -b 4096 -L temp-OST0001 -I 256 -q -O
dir_index,uninit_groups -F /dev/sdc
Writing CONFIGS/mountdata </screen>
</listitem>
<para>The command generates this output:</para>
<screen>LDISKFS-fs: file extents enabled
LDISKFS-fs: mballoc enabled
-Lustre: temp-OST0000: new disk, initializing
-Lustre: Server temp-OST0000 on device /dev/sdb has started</screen>
+Lustre: temp-OST0001: new disk, initializing
+Lustre: Server temp-OST0001 on device /dev/sdb has started</screen>
<para>Shortly afterwards, this output appears:</para>
- <screen>Lustre: temp-OST0000: received MDS connection from 10.2.0.1@tcp0
-Lustre: MDS temp-MDT0000: temp-OST0000_UUID now active, resetting orphans </screen>
+ <screen>Lustre: temp-OST0001: received MDS connection from 10.2.0.1@tcp0
+Lustre: MDS temp-MDT0000: temp-OST0001_UUID now active, resetting orphans </screen>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>Create the OST.</para>
<para>In this example, <literal>/dev/sdc</literal> is the RAID 6 device to be used as the OST, run:</para>
- <screen>[oss#] mkfs.lustre --ost --mgsnode=mds@osib --mkfsoptions="-J device=/dev/sd\
-b1" /dev/sdc
-</screen>
+ <screen>[oss#] mkfs.lustre --mgsnode=mds@osib --ost --index=0 \
+--mkfsoptions="-J device=/dev/sdb1" /dev/sdc</screen>
</listitem>
<listitem>
<para>Mount the OST as usual.</para>
<orderedlist>
<listitem>
<para> Add a new OST by passing on the following commands, run:</para>
- <screen>$ mkfs.lustre --fsname=spfs --ost --mgsnode=mds16@tcp0 /dev/sda
-$ mkdir -p /mnt/test/ost0
-$ mount -t lustre /dev/sda /mnt/test/ost0 </screen>
+ <screen>$ mkfs.lustre --fsname=spfs --mgsnode=mds16@tcp0 --ost --index=12 /dev/sda
+$ mkdir -p /mnt/test/ost12
+$ mount -t lustre /dev/sda /mnt/test/ost12</screen>
</listitem>
<listitem>
<para> Migrate the data (possibly).</para>
<screen>LABEL=testfs-MDT0000 /mnt/test/mdt lustre defaults,_netdev,noauto 0 0
LABEL=testfs-OST0000 /mnt/test/ost0 lustre defaults,_netdev,noauto 0 0</screen>
<para>In general, it is wise to specify noauto and let your high-availability (HA) package manage when to mount the device. If you are not using failover, make sure that networking has been started before mounting a Lustre server. RedHat, SuSE, Debian (and perhaps others) use the <literal>_netdev</literal> flag to ensure that these disks are mounted after the network is up.</para>
- <para>We are mounting by disk label here--the label of a device can be read with <literal>e2label</literal>. The label of a newly-formatted Lustre server ends in <literal>FFFF</literal>, meaning that it has yet to be assigned. The assignment takes place when the server is first started, and the disk label is updated.</para>
+ <para>We are mounting by disk label here. The label of a device can be read with <literal>e2label</literal>. The label of a newly-formatted Lustre server may end in <literal>FFFF</literal> if the <literal>--index</literal> option is not specified to <literal>mkfs.lustre</literal>, meaning that it has yet to be assigned. The assignment takes place when the server is first started, and the disk label is updated. It is recommended that the <literal>--index</literal> option always be used, which will also ensure that the label is set at format time.</para>
<caution>
<para>Do not do this when the client and OSS are on the same node, as memory pressure between the client and OSS can lead to deadlocks.</para>
</caution>
</listitem>
</itemizedlist>
<para>By default, the Lustre file system uses failover mode for OSTs. To specify failout mode instead, run this command:</para>
- <screen>$ mkfs.lustre --fsname=<fsname> --ost --mgsnode=<MGS node NID> --param="failover.mode=failout" <block device name></screen>
+ <screen>$ mkfs.lustre --fsname=<fsname> --mgsnode=<MGS node NID> --param="failover.mode=failout" --ost --index="OST index" <block device name></screen>
<para>In this example, failout mode is specified for the OSTs on MGS <literal>uml1</literal>, file system <literal>testfs</literal>.</para>
- <screen>$ mkfs.lustre --fsname=testfs --ost --mgsnode=uml1 --param="failover.mode=failout" /dev/sdb </screen>
+ <screen>$ mkfs.lustre --fsname=testfs --mgsnode=uml1 --param="failover.mode=failout" --ost --index=3 /dev/sdb </screen>
<caution>
<para>Before running this command, unmount all OSTs that will be affected by the change in the failover/failout mode.</para>
</caution>
<section xml:id="dbdoclet.50438194_88063">
<title><indexterm><primary>operations</primary><secondary>multiple file systems</secondary></indexterm>Running Multiple Lustre File Systems</title>
<para>There may be situations in which you want to run multiple file systems. This is doable, as long as you follow specific naming conventions.</para>
- <para>By default, the <literal>mkfs.lustre</literal> command creates a file system named <literal>lustre</literal>. To specify a different file system name (limited to 8 characters), run this command:</para>
- <para><screen>mkfs.lustre --fsname=<new file system name></screen></para>
+ <para>By default, the <literal>mkfs.lustre</literal> command creates a file system named <literal>lustre</literal>. To specify a different file system name (limited to 8 characters) at format time, use the <literal>--fsname</literal> option:</para>
+ <para><screen>mkfs.lustre --fsname=<file system name></screen></para>
<note>
- <para>The MDT, OSTs and clients in the new file system must share the same name (prepended to the device name). For example, for a new file system named <literal>foo</literal>, the MDT and two OSTs would be named <literal>foo-MDT0000</literal>, <literal>foo-OST0000</literal>, and <literal>foo-OST0001</literal>.</para>
+ <para>The MDT, OSTs and clients in the new file system must use the same filesystem name (prepended to the device name). For example, for a new file system named <literal>foo</literal>, the MDT and two OSTs would be named <literal>foo-MDT0000</literal>, <literal>foo-OST0000</literal>, and <literal>foo-OST0001</literal>.</para>
</note>
<para>To mount a client on the file system, run:</para>
<screen>mount -t lustre mgsnode:/<new fsname> <mountpoint></screen>
- <para>For example, to mount a client on file system foo at mount point /mnt/lustre1, run:</para>
- <screen>mount -t lustre mgsnode:/foo /mnt/lustre1</screen>
+ <para>For example, to mount a client on file system foo at mount point /mnt/foo, run:</para>
+ <screen>mount -t lustre mgsnode:/foo /mnt/foo</screen>
<note>
<para>If a client(s) will be mounted on several file systems, add the following line to <literal>/etc/xattr.conf</literal> file to avoid problems when files are moved between the file systems: <literal>lustre.* skip</literal></para>
</note>
<para>The MGS is universal; there is only one MGS per Lustre installation, not per file system.</para>
</note>
<note>
- <para>There is only one file system per MDT. Therefore, specify <literal>--mdt --mgs</literal> on one file system and -<literal>-mdt --mgsnode=<MGS node NID></literal> on the other file systems.</para>
+ <para>There is only one file system per MDT. Therefore, specify <literal>--mdt --mgs</literal> on one file system and <literal>--mdt --mgsnode=<MGS node NID></literal> on the other file systems.</para>
</note>
- <para>A Lustre installation with two file systems (<literal>foo</literal> and <literal>bar</literal>) could look like this, where the MGS node is <literal>mgsnode@tcp0</literal> and the mount points are <literal>/mnt/lustre1</literal> and <literal>/mnt/lustre2</literal>.</para>
- <screen>mgsnode# mkfs.lustre --mgs /mnt/lustre1
-mdtfoonode# mkfs.lustre --fsname=foo --mdt --mgsnode=mgsnode@tcp0 /mnt/lust\
-re1
-ossfoonode# mkfs.lustre --fsname=foo --ost --mgsnode=mgsnode@tcp0 /mnt/lust\
-re1
-ossfoonode# mkfs.lustre --fsname=foo --ost --mgsnode=mgsnode@tcp0 /mnt/lust\
-re2
-mdtbarnode# mkfs.lustre --fsname=bar --mdt --mgsnode=mgsnode@tcp0 /mnt/lust\
-re1
-ossbarnode# mkfs.lustre --fsname=bar --ost --mgsnode=mgsnode@tcp0 /mnt/lust\
-re1
-ossbarnode# mkfs.lustre --fsname=bar --ost --mgsnode=mgsnode@tcp0 /mnt/lust\
-re2</screen>
- <para>To mount a client on file system foo at mount point <literal>/mnt/lustre1</literal>, run:</para>
- <screen>mount -t lustre mgsnode@tcp0:/foo /mnt/lustre1</screen>
- <para>To mount a client on file system bar at mount point <literal>/mnt/lustre2</literal>, run:</para>
- <screen>mount -t lustre mgsnode@tcp0:/bar /mnt/lustre2</screen>
+ <para>A Lustre installation with two file systems (<literal>foo</literal> and <literal>bar</literal>) could look like this, where the MGS node is <literal>mgsnode@tcp0</literal> and the mount points are <literal>/mnt/foo</literal> and <literal>/mnt/bar</literal>.</para>
+ <screen>mgsnode# mkfs.lustre --mgs /dev/sda
+mdtfoonode# mkfs.lustre --fsname=foo --mgsnode=mgsnode@tcp0 --mdt --index=0 /dev/sdb
+ossfoonode# mkfs.lustre --fsname=foo --mgsnode=mgsnode@tcp0 --ost --index=0 /dev/sda
+ossfoonode# mkfs.lustre --fsname=foo --mgsnode=mgsnode@tcp0 --ost --index=1 /dev/sdb
+mdtbarnode# mkfs.lustre --fsname=bar --mgsnode=mgsnode@tcp0 --mdt --index=0 /dev/sda
+ossbarnode# mkfs.lustre --fsname=bar --mgsnode=mgsnode@tcp0 --ost --index=0 /dev/sdc
+ossbarnode# mkfs.lustre --fsname=bar --mgsnode=mgsnode@tcp0 --ost --index=1 /dev/sdd</screen>
+ <para>To mount a client on file system foo at mount point <literal>/mnt/foo</literal>, run:</para>
+ <screen>mount -t lustre mgsnode@tcp0:/foo /mnt/foo</screen>
+ <para>To mount a client on file system bar at mount point <literal>/mnt/bar</literal>, run:</para>
+ <screen>mount -t lustre mgsnode@tcp0:/bar /mnt/bar</screen>
</section>
<section xml:id="dbdoclet.50438194_88980">
<title><indexterm><primary>operations</primary><secondary>parameters</secondary></indexterm>Setting and Retrieving Lustre Parameters</title>
<screen>lctl list_nids</screen>
<para>This displays the server's NIDs (networks configured to work with Lustre).</para>
<para>This example has a combined MGS/MDT failover pair on uml1 and uml2, and a OST failover pair on uml3 and uml4. There are corresponding Elan addresses on uml1 and uml2.</para>
- <screen>uml1> mkfs.lustre --fsname=testfs --mdt --mgs --failnode=uml2,2@elan /dev/sda1
+ <screen>uml1> mkfs.lustre --fsname=testfs --mgs --mdt --index=0 --failnode=uml2,2@elan /dev/sda1
uml1> mount -t lustre /dev/sda1 /mnt/test/mdt
-uml3> mkfs.lustre --fsname=testfs --ost --failnode=uml4 --mgsnode=uml1,1@ela\
-n --mgsnode=uml2,2@elan /dev/sdb
+uml3> mkfs.lustre --fsname=testfs --failnode=uml4 --mgsnode=uml1,1@elan \
+--mgsnode=uml2,2@elan --ost --index=0 /dev/sdb
uml3> mount -t lustre /dev/sdb /mnt/test/ost0
client> mount -t lustre uml1,1@elan:uml2,2@elan:/testfs /mnt/testfs
uml1> umount /mnt/mdt
<orderedlist>
<listitem>
<para>On the OST, list the NIDs of all MGS nodes at <literal>mkfs</literal> time.</para>
- <screen>OST# mkfs.lustre --fsname sunfs --ost --mgsnode=10.0.0.1 \
- --mgsnode=10.0.0.2 /dev/{device}</screen>
+ <screen>OST# mkfs.lustre --fsname sunfs --mgsnode=10.0.0.1 \
+ --mgsnode=10.0.0.2 --ost --index=0 /dev/sdb</screen>
</listitem>
<listitem>
<para>On the client, mount the file system.</para>
</listitem>
<listitem>
<para>Erase the file system and, presumably, replace it with another file system, run:</para>
- <screen>$ mkfs.lustre -reformat --fsname spfs --mdt --mgs /dev/sda</screen>
+ <screen>$ mkfs.lustre --reformat --fsname spfs --mgs --mdt --index=0 /dev/sda</screen>
</listitem>
<listitem>
<para>If you have a separate MGS (that you do not want to reformat), then add the "writeconf" flag to <literal>mkfs.lustre</literal> on the MDT, run:</para>
- <screen>$ mkfs.lustre --reformat --writeconf -fsname spfs --mdt \ --mgs /dev/sda</screen>
+ <screen>$ mkfs.lustre --reformat --writeconf -fsname spfs --mgs --mdt --index=0 /dev/sda</screen>
</listitem>
</orderedlist>
<note>
<orderedlist>
<listitem>
<para>Add a new OST by passing on the following commands, run:</para>
- <screen>$ mkfs.lustre --fsname=spfs --ost --mgsnode=mds16@tcp0 /dev/sda
-$ mkdir -p /mnt/test/ost0
-$ mount -t lustre /dev/sda /mnt/test/ost0</screen>
+ <screen>$ mkfs.lustre --fsname=spfs --mgsnode=mds16@tcp0 --ost --index=12 /dev/sda
+$ mkdir -p /mnt/test/ost12
+$ mount -t lustre /dev/sda /mnt/test/ost12</screen>
</listitem>
<listitem>
<para>Migrate the data (possibly).</para>
$ mkdir -p /mnt/test/mdt
$ mount -t lustre /dev/sda /mnt/test/mdt
$ mount -t lustre mgs@o2ib0:/lustre /mnt/mdt
-$ mkfs.lustre --fsname lustre --ost --mgsnode=mds@o2ib0 /dev/sda
+$ mkfs.lustre --fsname lustre --mgsnode=mds@o2ib0 --ost --index=0 /dev/sda
$ mkdir -p /mnt/test/mdt
$ mount -t lustre /dev/sda /mnt/test/ost
-$ mount -t lustre mgs@o2ib0:/lustre /mnt/ost</screen>
+$ mount -t lustre mgs@o2ib0:/lustre /mnt/ost0</screen>
</listitem>
<listitem>
<para>Mount the clients.</para>
<para> <emphasis role="bold">--index</emphasis>=<emphasis>index</emphasis></para>
</entry>
<entry>
- <para> Forces a particular OST or MDT index.</para>
+ <para> Specifies the OST or MDT number. This should always be used when formatting OSTs, in order to ensure that there is a simple mapping between the OST index and the OSS node and device it is located on.</para>
</entry>
</row>
<row>
<para> Sets the mount options used when the backing file system is mounted.</para>
<para><emphasis role="bold">CAUTION</emphasis>: Unlike earlier versions of mkfs.lustre, this version completely replaces the default mount options with those specified on the command line, and issues a warning on stderr if any default mount options are omitted.</para>
<para>The defaults for ldiskfs are:</para>
- <para>OST: <emphasis>errors=remount-ro,mballoc,extents</emphasis>;</para>
+ <para>OST: <emphasis>errors=remount-ro</emphasis>;</para>
<para>MGS/MDT: <emphasis>errors=remount-ro,iopen_nopriv,user_xattr</emphasis></para>
<para>Do not alter the default mount options unless you know what you are doing.</para>
</entry>
<para>Creates a combined MGS and MDT for file system <emphasis role="bold">testfs</emphasis> on, e.g., node <emphasis role="bold">cfs21</emphasis>:</para>
<screen>mkfs.lustre --fsname=testfs --mdt --mgs /dev/sda1</screen>
<para>Creates an OST for file system <emphasis role="bold">testfs</emphasis> on any node (using the above MGS):</para>
- <screen>mkfs.lustre --fsname=testfs --ost --mgsnode=cfs21@tcp0 /dev/sdb</screen>
+ <screen>mkfs.lustre --fsname=testfs --mgsnode=cfs21@tcp0 --ost --index=0 /dev/sdb</screen>
<para>Creates a standalone MGS on, e.g., node <emphasis role="bold">cfs22</emphasis>:</para>
<screen>mkfs.lustre --mgs /dev/sda1</screen>
<para>Creates an MDT for file system <emphasis role="bold">myfs1</emphasis> on any node (using the above MGS):</para>