<?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_Configuration_Log_Management</id>
	<title>Lustre Configuration Log Management - 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_Configuration_Log_Management"/>
	<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=Lustre_Configuration_Log_Management&amp;action=history"/>
	<updated>2026-10-28T20:25:35Z</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_Configuration_Log_Management&amp;diff=5578&amp;oldid=prev</id>
		<title>Elliswilson: Created page with &quot;== Lustre Configuration Log Management ==  This page covers three powerful but &#039;&#039;&#039;potentially destructive&#039;&#039;&#039; commands for managing Lustre configuration logs: &lt;code&gt;writeconf&lt;/code&gt;, &lt;code&gt;replace_nids&lt;/code&gt;, and &lt;code&gt;clear_conf&lt;/code&gt;. Understand the implications of each before using them.  === Background ===  Lustre stores persistent configuration in &#039;&#039;&#039;configuration logs&#039;&#039;&#039; on the MGT. These logs tell servers and clients how to find each other and record persistent p...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=Lustre_Configuration_Log_Management&amp;diff=5578&amp;oldid=prev"/>
		<updated>2026-07-20T15:22:56Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Lustre Configuration Log Management ==  This page covers three powerful but &amp;#039;&amp;#039;&amp;#039;potentially destructive&amp;#039;&amp;#039;&amp;#039; commands for managing Lustre configuration logs: &amp;lt;code&amp;gt;writeconf&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;replace_nids&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;clear_conf&amp;lt;/code&amp;gt;. Understand the implications of each before using them.  === Background ===  Lustre stores persistent configuration in &amp;#039;&amp;#039;&amp;#039;configuration logs&amp;#039;&amp;#039;&amp;#039; on the MGT. These logs tell servers and clients how to find each other and record persistent p...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Lustre Configuration Log Management ==&lt;br /&gt;
&lt;br /&gt;
This page covers three powerful but &amp;#039;&amp;#039;&amp;#039;potentially destructive&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
commands for managing Lustre configuration logs: &amp;lt;code&amp;gt;writeconf&amp;lt;/code&amp;gt;,&lt;br /&gt;
&amp;lt;code&amp;gt;replace_nids&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;clear_conf&amp;lt;/code&amp;gt;. Understand&lt;br /&gt;
the implications of each before using them.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
Lustre stores persistent configuration in &amp;#039;&amp;#039;&amp;#039;configuration logs&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
on the MGT. These logs tell servers and clients how to find each&lt;br /&gt;
other and record persistent parameter settings (those set with&lt;br /&gt;
&amp;lt;code&amp;gt;lctl conf_param&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
When you change server parameters, add targets, or reconfigure&lt;br /&gt;
networking, these logs may need to be updated. The three commands&lt;br /&gt;
below provide different levels of log manipulation.&lt;br /&gt;
&lt;br /&gt;
=== writeconf — Regenerate Configuration Logs ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;writeconf&amp;lt;/code&amp;gt; erases the existing configuration log and&lt;br /&gt;
regenerates it from scratch using the information stored on each&lt;br /&gt;
target device.&lt;br /&gt;
&lt;br /&gt;
==== When to Use ====&lt;br /&gt;
&lt;br /&gt;
* The configuration log is corrupted and the filesystem cannot start.&lt;br /&gt;
* You are changing server NIDs and &amp;lt;code&amp;gt;replace_nids&amp;lt;/code&amp;gt; is not available or not sufficient.&lt;br /&gt;
&lt;br /&gt;
==== What It Destroys ====&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Warning:&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;writeconf&amp;lt;/code&amp;gt; erases:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;All OST pool definitions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;All persistent parameters set with &amp;lt;code&amp;gt;lctl conf_param&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Parameters set with &amp;lt;code&amp;gt;lctl set_param -P&amp;lt;/code&amp;gt; are &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
erased (they are stored differently on the MGS).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Before running writeconf, save the current configuration:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 mgs# lctl --device MGS llog_print testfs-client&lt;br /&gt;
 mgs# lctl --device MGS llog_print testfs-MDT0000&lt;br /&gt;
 mgs# lctl --device MGS llog_print testfs-OST0000&lt;br /&gt;
&lt;br /&gt;
Keep this output so you can recreate pool definitions and&lt;br /&gt;
&amp;lt;code&amp;gt;conf_param&amp;lt;/code&amp;gt; settings after writeconf.&lt;br /&gt;
&lt;br /&gt;
==== Procedure ====&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 1: Shut down the filesystem completely.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 # Unmount clients&lt;br /&gt;
 client# umount /mnt/lustre&lt;br /&gt;
 &lt;br /&gt;
 # Unmount MDTs&lt;br /&gt;
 mds# umount /mnt/mdt&lt;br /&gt;
 &lt;br /&gt;
 # Unmount OSTs&lt;br /&gt;
 oss# umount /mnt/ost*&lt;br /&gt;
 &lt;br /&gt;
 # MGS can remain mounted if it is separate from the MDT&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 2: Run writeconf on all MDTs first, then all OSTs.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
On each MDS:&lt;br /&gt;
&lt;br /&gt;
 tunefs.lustre --writeconf /dev/mdt_device&lt;br /&gt;
&lt;br /&gt;
On each OSS:&lt;br /&gt;
&lt;br /&gt;
 tunefs.lustre --writeconf /dev/ost_device&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 3: Restart the filesystem in order.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 # Mount MGT (if separate and not already mounted)&lt;br /&gt;
 # Mount MDT(s), starting with MDT0000&lt;br /&gt;
 # Mount OSTs, starting with OST0000&lt;br /&gt;
 # Mount clients&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 4: Recreate pool definitions and conf_param settings.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Use the saved output from the pre-writeconf backup to restore your&lt;br /&gt;
settings.&lt;br /&gt;
&lt;br /&gt;
=== replace_nids — Change Server Network Addresses ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;replace_nids&amp;lt;/code&amp;gt; updates the NID (network address) of a&lt;br /&gt;
server in the configuration log &amp;#039;&amp;#039;&amp;#039;without&amp;#039;&amp;#039;&amp;#039; destroying other&lt;br /&gt;
configuration. This is the &amp;#039;&amp;#039;&amp;#039;preferred method&amp;#039;&amp;#039;&amp;#039; for NID changes.&lt;br /&gt;
&lt;br /&gt;
==== When to Use ====&lt;br /&gt;
&lt;br /&gt;
* A server is moving to a new machine or IP address.&lt;br /&gt;
* A new network card is installed.&lt;br /&gt;
* IP addresses are being reassigned.&lt;br /&gt;
&lt;br /&gt;
==== Procedure ====&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 1: Update LNet configuration&amp;#039;&amp;#039;&amp;#039; on the affected server(s)&lt;br /&gt;
so the new NID is correct. Verify with:&lt;br /&gt;
&lt;br /&gt;
 lctl list_nids&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 2: Shut down the filesystem.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 client# umount /mnt/lustre&lt;br /&gt;
 mds# umount /mnt/mdt&lt;br /&gt;
 oss# umount /mnt/ost*&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 3: Start the MGS only&amp;#039;&amp;#039;&amp;#039; (if MGS shares a device with MDT):&lt;br /&gt;
&lt;br /&gt;
 mount -t lustre /dev/mdt_device -o nosvc /mnt/mgt&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 4: Run replace_nids.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 lctl replace_nids &amp;lt;device_name&amp;gt; &amp;lt;new_nid&amp;gt;[,&amp;lt;nid2&amp;gt;,&amp;lt;nid3&amp;gt;...]&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 lctl replace_nids testfs-OST0013 192.168.1.100@tcp&lt;br /&gt;
 lctl replace_nids testfs-MDT0000 10.0.0.5@tcp,10.0.0.5@o2ib&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 5: Stop the MGS&amp;#039;&amp;#039;&amp;#039; (if started with &amp;lt;code&amp;gt;nosvc&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 umount /mnt/mgt&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 6: Restart the filesystem normally.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==== Advantages Over writeconf ====&lt;br /&gt;
&lt;br /&gt;
* Does &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; erase pool definitions.&lt;br /&gt;
* Does &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; erase &amp;lt;code&amp;gt;conf_param&amp;lt;/code&amp;gt; settings.&lt;br /&gt;
* Backs up the previous config log with &amp;lt;code&amp;gt;.bak&amp;lt;/code&amp;gt; suffix.&lt;br /&gt;
* Also cleans old, invalidated records from the log while preserving current settings.&lt;br /&gt;
&lt;br /&gt;
=== clear_conf — Clean SKIP Records ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;clear_conf&amp;lt;/code&amp;gt; removes records marked as &amp;lt;code&amp;gt;SKIP&amp;lt;/code&amp;gt;&lt;br /&gt;
from the configuration log. These accumulate over time as parameters&lt;br /&gt;
are changed, and cleaning them reduces log size and startup time.&lt;br /&gt;
&lt;br /&gt;
==== When to Use ====&lt;br /&gt;
&lt;br /&gt;
* Configuration logs have grown large due to many parameter changes.&lt;br /&gt;
* You want to clean up obsolete SKIP entries without a full writeconf.&lt;br /&gt;
&lt;br /&gt;
==== Procedure ====&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 1: Shut down the filesystem.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 2: Start the MGS only&amp;#039;&amp;#039;&amp;#039; (if shared with MDT):&lt;br /&gt;
&lt;br /&gt;
 mount -t lustre /dev/mdt_device -o nosvc /mnt/mgt&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 3: Run clear_conf.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 # Clear a specific device&amp;#039;s config:&lt;br /&gt;
 lctl clear_conf testfs-MDT0000&lt;br /&gt;
 &lt;br /&gt;
 # Or clear all configs for a filesystem:&lt;br /&gt;
 lctl clear_conf testfs&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 4: Stop the MGS and restart normally.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The previous config log is backed up with a timestamp suffix (e.g.,&lt;br /&gt;
&amp;lt;code&amp;gt;Lustre-MDT0000-1476454535.bak&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Comparison ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! !! writeconf !! replace_nids !! clear_conf&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Purpose&amp;#039;&amp;#039;&amp;#039; || Full config rebuild || Change server NID || Remove SKIP records&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Destroys pools?&amp;#039;&amp;#039;&amp;#039; || &amp;#039;&amp;#039;&amp;#039;Yes&amp;#039;&amp;#039;&amp;#039; || No || No&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Destroys conf_param?&amp;#039;&amp;#039;&amp;#039; || &amp;#039;&amp;#039;&amp;#039;Yes&amp;#039;&amp;#039;&amp;#039; || No || No&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Destroys set_param -P?&amp;#039;&amp;#039;&amp;#039; || No || No || No&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Requires full shutdown?&amp;#039;&amp;#039;&amp;#039; || Yes || Yes || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Backs up old config?&amp;#039;&amp;#039;&amp;#039; || No || Yes (.bak) || Yes (timestamp.bak)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Risk level&amp;#039;&amp;#039;&amp;#039; || &amp;#039;&amp;#039;&amp;#039;High&amp;#039;&amp;#039;&amp;#039; || Low || Low&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== See Also ===&lt;br /&gt;
&lt;br /&gt;
* [[Lustre File System Expansion]] — Adding targets&lt;br /&gt;
* [[Lustre OST MDT Removal]] — Removing targets&lt;br /&gt;
* [[Lustre Common Mistakes]] — Why writeconf is dangerous&lt;/div&gt;</summary>
		<author><name>Elliswilson</name></author>
	</entry>
</feed>