<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.lustre.org/index.php?action=history&amp;feed=atom&amp;title=Lustre_File_System_Expansion</id>
	<title>Lustre File System Expansion - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.lustre.org/index.php?action=history&amp;feed=atom&amp;title=Lustre_File_System_Expansion"/>
	<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=Lustre_File_System_Expansion&amp;action=history"/>
	<updated>2026-10-29T00:35:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>http://wiki.lustre.org/index.php?title=Lustre_File_System_Expansion&amp;diff=5570&amp;oldid=prev</id>
		<title>Elliswilson: Created page with &quot;== Lustre File System Expansion: Adding MDTs and OSTs ==  This page provides step-by-step procedures for adding new OSTs and MDTs to an existing Lustre filesystem. These operations can be performed &#039;&#039;&#039;online&#039;&#039;&#039; — the filesystem remains available to clients during the expansion.  For removing OSTs or MDTs, see Lustre OST MDT Removal.  === Adding a New OST ===  Use this procedure to increase storage capacity.  ==== Prerequisites ====  * A block device (or ZFS pool) f...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=Lustre_File_System_Expansion&amp;diff=5570&amp;oldid=prev"/>
		<updated>2026-07-06T14:27:05Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Lustre File System Expansion: Adding MDTs and OSTs ==  This page provides step-by-step procedures for adding new OSTs and MDTs to an existing Lustre filesystem. These operations can be performed &amp;#039;&amp;#039;&amp;#039;online&amp;#039;&amp;#039;&amp;#039; — the filesystem remains available to clients during the expansion.  For removing OSTs or MDTs, see &lt;a href=&quot;/Lustre_OST_MDT_Removal&quot; title=&quot;Lustre OST MDT Removal&quot;&gt;Lustre OST MDT Removal&lt;/a&gt;.  === Adding a New OST ===  Use this procedure to increase storage capacity.  ==== Prerequisites ====  * A block device (or ZFS pool) f...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Lustre File System Expansion: Adding MDTs and OSTs ==&lt;br /&gt;
&lt;br /&gt;
This page provides step-by-step procedures for adding new OSTs and&lt;br /&gt;
MDTs to an existing Lustre filesystem. These operations can be&lt;br /&gt;
performed &amp;#039;&amp;#039;&amp;#039;online&amp;#039;&amp;#039;&amp;#039; — the filesystem remains available to clients&lt;br /&gt;
during the expansion.&lt;br /&gt;
&lt;br /&gt;
For removing OSTs or MDTs, see [[Lustre OST MDT Removal]].&lt;br /&gt;
&lt;br /&gt;
=== Adding a New OST ===&lt;br /&gt;
&lt;br /&gt;
Use this procedure to increase storage capacity.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* A block device (or ZFS pool) for the new OST on the target OSS.&lt;br /&gt;
* The OSS has Lustre server packages installed.&lt;br /&gt;
* The OSS can reach the MGS on port 988.&lt;br /&gt;
* The next available OST index. Check with: lctl dl | grep osc lfs osts /mnt/lustre&lt;br /&gt;
&lt;br /&gt;
==== Procedure ====&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 1: Format the new OST.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
On the OSS node:&lt;br /&gt;
&lt;br /&gt;
 mkfs.lustre --fsname=testfs --mgsnode=mgsnode@tcp \&lt;br /&gt;
     --ost --index=&amp;lt;next_index&amp;gt; /dev/sdb&lt;br /&gt;
&lt;br /&gt;
For ZFS:&lt;br /&gt;
&lt;br /&gt;
 mkfs.lustre --backfstype=zfs --fsname=testfs --mgsnode=mgsnode@tcp \&lt;br /&gt;
     --ost --index=&amp;lt;next_index&amp;gt; ost_pool/ost_dataset /dev/sdb&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 2: Create mount point and mount the OST.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /mnt/testfs/ost&amp;lt;N&amp;gt;&lt;br /&gt;
 mount -t lustre /dev/sdb /mnt/testfs/ost&amp;lt;N&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 3: Verify the new OST is visible.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
On any client:&lt;br /&gt;
&lt;br /&gt;
 lfs df /mnt/lustre&lt;br /&gt;
&lt;br /&gt;
The new OST should appear in the list with its full capacity.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 4: (Optional) Rebalance existing data.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
New files will automatically prefer OSTs with more free space (via&lt;br /&gt;
the weighted allocator). To rebalance existing files:&lt;br /&gt;
&lt;br /&gt;
 # Migrate files from a specific full OST to the new one:&lt;br /&gt;
 lfs find --ost testfs-OST0004 -size +4G /mnt/lustre | lfs_migrate -y&lt;br /&gt;
&lt;br /&gt;
 # Or migrate an entire directory:&lt;br /&gt;
 lfs_migrate /mnt/lustre/old_project/&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; For best load balancing, configure the same number of&lt;br /&gt;
OSTs per OSS across all OSSs.&lt;br /&gt;
&lt;br /&gt;
=== Adding a New MDT (DNE) ===&lt;br /&gt;
&lt;br /&gt;
Use this procedure to increase metadata capacity or performance by&lt;br /&gt;
distributing the namespace across multiple MDS servers.&lt;br /&gt;
&lt;br /&gt;
==== When to Add an MDT ====&lt;br /&gt;
&lt;br /&gt;
* The existing MDT(s) are approaching the 4 billion inode limit (ldiskfs).&lt;br /&gt;
* Metadata operation rates exceed what a single MDS can handle.&lt;br /&gt;
* You want to isolate different projects onto different MDTs.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* A block device for the new MDT on the MDS server. SSD/NVMe strongly recommended.&lt;br /&gt;
* Lustre server packages installed on the MDS.&lt;br /&gt;
* The next available MDT index.&lt;br /&gt;
&lt;br /&gt;
==== Procedure ====&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 1: Find the next available MDT index.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 client$ lctl dl | grep mdc&lt;br /&gt;
&lt;br /&gt;
Each MDT has a unique index starting from 0.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 2: Format the new MDT.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
On the MDS node:&lt;br /&gt;
&lt;br /&gt;
 mkfs.lustre --reformat --fsname=testfs --mdt \&lt;br /&gt;
     --mgsnode=mgsnode@tcp --index=&amp;lt;next_index&amp;gt; /dev/sdc&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 3: Mount the new MDT.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /mnt/mdt&amp;lt;N&amp;gt;&lt;br /&gt;
 mount -t lustre /dev/sdc /mnt/mdt&amp;lt;N&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 4: Create directories on the new MDT.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
New MDTs do &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; automatically receive new files. You must&lt;br /&gt;
explicitly create directories on them:&lt;br /&gt;
&lt;br /&gt;
 # Create a directory managed by the new MDT:&lt;br /&gt;
 lfs mkdir -i &amp;lt;mdt_index&amp;gt; /mnt/lustre/new_project&lt;br /&gt;
&lt;br /&gt;
 # Create a striped directory across multiple MDTs (Lustre 2.8+):&lt;br /&gt;
 lfs mkdir -c 4 /mnt/lustre/large_project&lt;br /&gt;
&lt;br /&gt;
 # Set auto-distribution for new subdirectories (Lustre 2.13+):&lt;br /&gt;
 lfs setdirstripe -D -c 1 -i -1 /mnt/lustre/auto_balanced/&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; In Lustre 2.15+, if no default directory layout is set&lt;br /&gt;
on the root directory, the MDS auto-configures round-robin&lt;br /&gt;
distribution across all MDTs for new top-level subdirectories.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 5: Verify.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 # Check which MDT manages a directory:&lt;br /&gt;
 lfs getstripe --mdt-index /mnt/lustre/new_project&lt;br /&gt;
&lt;br /&gt;
 # Check MDT usage:&lt;br /&gt;
 lfs df -i /mnt/lustre&lt;br /&gt;
&lt;br /&gt;
==== Important Notes ====&lt;br /&gt;
&lt;br /&gt;
* The root directory always remains on MDT0000.&lt;br /&gt;
* Files and subdirectories below a directory inherit its MDT unless explicitly overridden.&lt;br /&gt;
* Clients older than Lustre 2.4 cannot access directories on MDTs other than MDT0000.&lt;br /&gt;
&lt;br /&gt;
=== Updating fstab ===&lt;br /&gt;
&lt;br /&gt;
After adding new targets, update &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; on the&lt;br /&gt;
relevant servers for persistence across reboots:&lt;br /&gt;
&lt;br /&gt;
 LABEL=testfs-OST0012 /mnt/testfs/ost12 lustre defaults,_netdev,noauto 0 0&lt;br /&gt;
 LABEL=testfs-MDT0004 /mnt/testfs/mdt4  lustre defaults,_netdev,noauto 0 0&lt;br /&gt;
&lt;br /&gt;
If using Pacemaker for HA, update the resource configuration instead&lt;br /&gt;
of fstab.&lt;br /&gt;
&lt;br /&gt;
=== See Also ===&lt;br /&gt;
&lt;br /&gt;
* [[Lustre OST MDT Removal]] — Deactivating and removing targets&lt;br /&gt;
* [[Lustre Configuration Log Management]] — writeconf, replace_nids&lt;br /&gt;
* [[Handling Full OSTs]] — Managing full OSTs&lt;br /&gt;
* [[Lustre Deployment Patterns]] — Reference architectures&lt;br /&gt;
* [[Lustre Hardware Sizing Guide]] — Planning target sizes&lt;/div&gt;</summary>
		<author><name>Elliswilson</name></author>
	</entry>
</feed>