<?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=Starting_and_Stopping_LNet</id>
	<title>Starting and Stopping LNet - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.lustre.org/index.php?action=history&amp;feed=atom&amp;title=Starting_and_Stopping_LNet"/>
	<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=Starting_and_Stopping_LNet&amp;action=history"/>
	<updated>2026-08-10T19:36:08Z</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=Starting_and_Stopping_LNet&amp;diff=2726&amp;oldid=prev</id>
		<title>Malcolm at 05:47, 31 August 2017</title>
		<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=Starting_and_Stopping_LNet&amp;diff=2726&amp;oldid=prev"/>
		<updated>2017-08-31T05:47:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:47, 30 August 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l159&quot;&gt;Line 159:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 159:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Lustre Networking (LNet)]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Lustre Networking (LNet)]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Lustre Systems Administration]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki_lustre_org:diff::1.12:old-2612:rev-2726 --&gt;
&lt;/table&gt;</summary>
		<author><name>Malcolm</name></author>
	</entry>
	<entry>
		<id>http://wiki.lustre.org/index.php?title=Starting_and_Stopping_LNet&amp;diff=2612&amp;oldid=prev</id>
		<title>Malcolm at 03:28, 10 August 2017</title>
		<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=Starting_and_Stopping_LNet&amp;diff=2612&amp;oldid=prev"/>
		<updated>2017-08-10T03:28:34Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:28, 9 August 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l154&quot;&gt;Line 154:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 154:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;File system      Size  Used Avail Use% Mounted on&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;File system      Size  Used Avail Use% Mounted on&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;mgspool/mgt     960M  2.2M  956M   1% /lfs/mgt&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;mgspool/mgt     960M  2.2M  956M   1% /lfs/mgt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;From this example, it can be seen that because the MGS is mounted, &amp;lt;code&amp;gt;lustre_rmmod&amp;lt;/code&amp;gt; takes no action to remove the kernel modules. Instead, it shows that there are active services running on the host and exits. The MGT is still mounted and the MGS is running. The &amp;lt;code&amp;gt;lustre_rmmod&amp;lt;/code&amp;gt; command is a very useful tool for ensuring the correct and safe unloading of Lustre kernel modules.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;From this example, it can be seen that because the MGS is mounted, &amp;lt;code&amp;gt;lustre_rmmod&amp;lt;/code&amp;gt; takes no action to remove the kernel modules. Instead, it shows that there are active services running on the host and exits. The MGT is still mounted and the MGS is running. The &amp;lt;code&amp;gt;lustre_rmmod&amp;lt;/code&amp;gt; command is a very useful tool for ensuring the correct and safe unloading of Lustre kernel modules.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Lustre Networking (LNet)]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Lustre Networking (LNet)]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki_lustre_org:diff::1.12:old-2607:rev-2612 --&gt;
&lt;/table&gt;</summary>
		<author><name>Malcolm</name></author>
	</entry>
	<entry>
		<id>http://wiki.lustre.org/index.php?title=Starting_and_Stopping_LNet&amp;diff=2607&amp;oldid=prev</id>
		<title>Malcolm: Created page with &quot;LNet, like most of the services that comprise a Lustre file system, runs in the Linux kernel and is incorporated as a kernel module. LNet is started in two steps:  # Load the...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=Starting_and_Stopping_LNet&amp;diff=2607&amp;oldid=prev"/>
		<updated>2017-08-10T03:13:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;LNet, like most of the services that comprise a Lustre file system, runs in the Linux kernel and is incorporated as a kernel module. LNet is started in two steps:  # Load the...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;LNet, like most of the services that comprise a Lustre file system, runs in the Linux kernel and is incorporated as a kernel module. LNet is started in two steps:&lt;br /&gt;
&lt;br /&gt;
# Load the kernel modules&lt;br /&gt;
# Start the services&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;lnet&amp;lt;/code&amp;gt; kernel module can be loaded directly through the modprobe command or indirectly by loading a kernel module that has a dependency on LNet. In normal operation, the &amp;lt;code&amp;gt;lnet&amp;lt;/code&amp;gt; module will be loaded indirectly as a consequence of attempting to start a Lustre service, e.g. by mounting a file system on a client. However, one can treat LNet as independent of Lustre and start it on its own. This is useful for testing and debugging purposes, and to provide some verification of correctness when a system boots up prior to committing to loading the higher-level services (i.e. Lustre).&lt;br /&gt;
&lt;br /&gt;
To load the LNet kernel module, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
modprobe [-v] lnet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-v&amp;lt;/code&amp;gt; flag is optional and provides verbose output, which is useful for debugging purposes but is normally omitted. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
[root@rh7z-pe ~]# modprobe -v lnet&lt;br /&gt;
insmod /lib/modules/3.10.0-327.13.1.el7_lustre.x86_64/extra/kernel/net/lustre/libcfs.ko &lt;br /&gt;
insmod /lib/modules/3.10.0-327.13.1.el7_lustre.x86_64/extra/kernel/net/lustre/lnet.ko networks=&amp;quot;tcp0(eth1)&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that a second module, called &amp;lt;code&amp;gt;libcfs.ko&amp;lt;/code&amp;gt;, was also loaded. The &amp;lt;code&amp;gt;libcfs&amp;lt;/code&amp;gt; module is an API used throughout Lustre and LNet and provides primitives for things like process management, memory management, and debugging. &lt;br /&gt;
&lt;br /&gt;
After the module is loaded, the LNet service needs to be started:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
lctl network up&lt;br /&gt;
# or&lt;br /&gt;
lctl network configure&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;lctl network&amp;lt;/code&amp;gt; command works on all versions of Lustre, and prior to version 2.7, it is the only way to manually start LNet. In Lustre 2.7 and onward, there is also the &amp;lt;code&amp;gt;lnetctl&amp;lt;/code&amp;gt; utility:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
lnetctl lnet configure [--all]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;lnetctl configure&amp;lt;/code&amp;gt; command will not automatically configure networks that are specified in the kernel module parameters; the &amp;lt;code&amp;gt;lnet&amp;lt;/code&amp;gt; service will start, but the interfaces will not be configured. Supplying the &amp;lt;code&amp;gt;--all&amp;lt;/code&amp;gt; flag will cause all of the networks defined as kernel module options to be loaded and started.&lt;br /&gt;
&lt;br /&gt;
To view the loaded configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
lctl list_nids&lt;br /&gt;
&lt;br /&gt;
# or for dynamic lnet in Lustre 2.7+&lt;br /&gt;
lnetctl net show [--verbose]&lt;br /&gt;
lnetctl export&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;lnetctl export&amp;lt;/code&amp;gt; command is equivalent to &amp;lt;code&amp;gt;lnetctl net show --verbose&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To shut down LNet and unload the kernel modules, first stop the LNet networks on the host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
lctl network down&lt;br /&gt;
# or &lt;br /&gt;
lctl network unconfigure&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then use the &amp;lt;code&amp;gt;lustre_rmmod&amp;lt;/code&amp;gt; command to unload the kernel modules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
lustre_rmmod&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One can unload the module by using &amp;lt;code&amp;gt;rmmod&amp;lt;/code&amp;gt; directly:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
rmmod lnet&lt;br /&gt;
rmmod libcfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lustre_rmmod&amp;lt;/code&amp;gt; is the recommended method for unloading Lustre and LNet kernel modules, because it will check for dependencies and eliminates any guesswork on the part of the systems administrator in trying to identify all of the modules to unload and the correct sequence for doing so.&lt;br /&gt;
&lt;br /&gt;
LNet can also be loaded indirectly, as a dependency of the &amp;lt;code&amp;gt;lustre&amp;lt;/code&amp;gt; kernel module. If LNet is loaded in this way, its start-up behavior is different because the LNet networks defined in kernel module options will be automatically configured and brought online. This is easily illustrated just by loading the Lustre module:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
[root@rh7z-pe ~]# modprobe -v lustre&lt;br /&gt;
insmod /lib/modules/3.10.0-327.13.1.el7_lustre.x86_64/extra/kernel/net/lustre/libcfs.ko &lt;br /&gt;
insmod /lib/modules/3.10.0-327.13.1.el7_lustre.x86_64/extra/kernel/net/lustre/lnet.ko networks=&amp;quot;tcp0(eth1)&amp;quot; &lt;br /&gt;
insmod /lib/modules/3.10.0-327.13.1.el7_lustre.x86_64/extra/kernel/fs/lustre/obdclass.ko &lt;br /&gt;
insmod /lib/modules/3.10.0-327.13.1.el7_lustre.x86_64/extra/kernel/fs/lustre/ptlrpc.ko &lt;br /&gt;
insmod /lib/modules/3.10.0-327.13.1.el7_lustre.x86_64/extra/kernel/fs/lustre/fld.ko &lt;br /&gt;
insmod /lib/modules/3.10.0-327.13.1.el7_lustre.x86_64/extra/kernel/fs/lustre/fid.ko &lt;br /&gt;
insmod /lib/modules/3.10.0-327.13.1.el7_lustre.x86_64/extra/kernel/fs/lustre/lov.ko &lt;br /&gt;
insmod /lib/modules/3.10.0-327.13.1.el7_lustre.x86_64/extra/kernel/fs/lustre/mdc.ko &lt;br /&gt;
insmod /lib/modules/3.10.0-327.13.1.el7_lustre.x86_64/extra/kernel/fs/lustre/lmv.ko &lt;br /&gt;
insmod /lib/modules/3.10.0-327.13.1.el7_lustre.x86_64/extra/kernel/fs/lustre/lustre.ko&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the &amp;lt;code&amp;gt;lnet.ko&amp;lt;/code&amp;gt; module is loaded as a dependency. The console and kernel ring buffer output will look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
[266699.213610] LNet: HW CPU cores: 2, npartitions: 1&lt;br /&gt;
[266699.232630] alg: No test for adler32 (adler32-zlib)&lt;br /&gt;
[266699.234184] alg: No test for crc32 (crc32-table)&lt;br /&gt;
[266707.286906] Lustre: Lustre: Build Version: jenkins-arch=x86_64,build_type=server,distro=el7,ib_stack=inkernel-40--PRISTINE-3.10.0-327.13.1.el7_lustre.x86_64&lt;br /&gt;
[266707.338890] LNet: Added LNI 192.168.207.2@tcp [8/256/0/180]&lt;br /&gt;
[266707.339851] LNet: Accept secure, port 988&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As can be seen in the above output, the LNet networks were automatically loaded.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;lustre_rmmod&amp;lt;/code&amp;gt; behavior is also different in this circumstance, compared to loading LNet on its own. If the administrator loads and configures LNet on its own, independently of the Lustre module, then it is necessary to unconfigure the LNet networks before removing the kernel modules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
[root@rh7z-pe ~]# modprobe lnet&lt;br /&gt;
[root@rh7z-pe ~]# lctl network up&lt;br /&gt;
LNET configured&lt;br /&gt;
[root@rh7z-pe ~]# lctl list_nids&lt;br /&gt;
192.168.207.2@tcp&lt;br /&gt;
[root@rh7z-pe ~]# lustre_rmmod&lt;br /&gt;
Modules still loaded: &lt;br /&gt;
lnet/klnds/socklnd/ksocklnd.o lnet/lnet/lnet.o libcfs/libcfs/libcfs.o&lt;br /&gt;
[root@rh7z-pe ~]# lctl network down&lt;br /&gt;
LNET ready to unload&lt;br /&gt;
[root@rh7z-pe ~]# lustre_rmmod&lt;br /&gt;
[root@rh7z-pe ~]# lsmod |grep lnet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, if the &amp;lt;code&amp;gt;lnet&amp;lt;/code&amp;gt; module is loaded indirectly, as a dependency of the Lustre kernel module, then &amp;lt;code&amp;gt;lustre_rmmod&amp;lt;/code&amp;gt; will gracefully unload all modules including &amp;lt;code&amp;gt;lnet&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
[root@rh7z-pe ~]# modprobe lustre&lt;br /&gt;
[root@rh7z-pe ~]# lctl list_nids&lt;br /&gt;
192.168.207.2@tcp&lt;br /&gt;
[root@rh7z-pe ~]# lustre_rmmod&lt;br /&gt;
[root@rh7z-pe ~]# lsmod | grep -E lnet\|lustre&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This behavior is consistent, but not entirely intuitive. The reason for this behavior has to do with a special function of LNet: routing. LNet routing enables a node that is connected to more than one LNet fabric to route traffic between the networks.  LNet routing is a complex topic and is not discussed in this article. For more information on LNet routers, see:&lt;br /&gt;
&lt;br /&gt;
http://www.intel.com/content/www/us/en/software/configuring-lnet-routers-file-systems-lustre-guide.html&lt;br /&gt;
&lt;br /&gt;
Because routing is a function of the network, not of the Lustre file system itself, &amp;lt;code&amp;gt;lustre_rmmod&amp;lt;/code&amp;gt; will effectively assume that if a host has only the &amp;lt;code&amp;gt;lnet&amp;lt;/code&amp;gt; module loaded and running, then it is providing routing services. &amp;lt;code&amp;gt;lustre_rmmod&amp;lt;/code&amp;gt; will therefore refuse to unload the modules unless the &amp;lt;code&amp;gt;lnet&amp;lt;/code&amp;gt; service is explicitly unconfigured.&lt;br /&gt;
&lt;br /&gt;
If, on the other hand, the lustre kernel module is also loaded, and there are no file systems mounted, then &amp;lt;code&amp;gt;lustre_rmmod&amp;lt;/code&amp;gt; will assume that the host is either an idle server or client and will unload the entire stack, including the &amp;lt;code&amp;gt;lnet&amp;lt;/code&amp;gt; modules.&lt;br /&gt;
&lt;br /&gt;
If a Lustre OSD is mounted on a host, then the &amp;lt;code&amp;gt;lustre_rmmod&amp;lt;/code&amp;gt; command will not unload the Lustre kernel modules and will report an error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
[root@rh7z-mds1 ~]# df -ht lustre&lt;br /&gt;
File system      Size  Used Avail Use% Mounted on&lt;br /&gt;
mgspool/mgt     960M  2.2M  956M   1% /lfs/mgt&lt;br /&gt;
&lt;br /&gt;
[root@rh7z-mds1 ~]# lustre_rmmod&lt;br /&gt;
  0 UP osd-zfs MGS-osd MGS-osd_UUID 5&lt;br /&gt;
  1 UP mgs MGS MGS 7&lt;br /&gt;
  2 UP mgc MGC192.168.227.11@tcp1 c2108a9c-a62f-6626-48e4-68f1caf1bce3 5&lt;br /&gt;
Modules still loaded: &lt;br /&gt;
lustre/mgs/mgs.o lustre/mgc/mgc.o lustre/quota/lquota.o lustre/fid/fid.o lustre/fld/fld.o lnet/klnds/socklnd/ksocklnd.o lustre/ptlrpc/ptlrpc.o lustre/obdclass/obdclass.o lnet/lnet/lnet.o libcfs/libcfs/libcfs.o&lt;br /&gt;
&lt;br /&gt;
[root@rh7z-mds1 ~]# df -ht lustre&lt;br /&gt;
File system      Size  Used Avail Use% Mounted on&lt;br /&gt;
mgspool/mgt     960M  2.2M  956M   1% /lfs/mgt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example, it can be seen that because the MGS is mounted, &amp;lt;code&amp;gt;lustre_rmmod&amp;lt;/code&amp;gt; takes no action to remove the kernel modules. Instead, it shows that there are active services running on the host and exits. The MGT is still mounted and the MGS is running. The &amp;lt;code&amp;gt;lustre_rmmod&amp;lt;/code&amp;gt; command is a very useful tool for ensuring the correct and safe unloading of Lustre kernel modules.&lt;br /&gt;
&lt;br /&gt;
[[Category:Lustre Networking (LNet)]]&lt;/div&gt;</summary>
		<author><name>Malcolm</name></author>
	</entry>
</feed>