<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>Hi,</p>
<p>I'm always confused of which NID to use if multiple LNET interfaces are available on server and client.<br />Someone told me connection between Lustre client and OSS is determined by which NID of MGS is specified when mounting<br /><br />To make it clear, I establish a VM environment to verify:<br /><br />In the testing environment, there are only one MDS, OSS and Client.<br />Each of them has two Ethernet interfaces.<br />All nodes have the following lnet configuration in modprobe.d<br /><br />options lnet networks=tcp0(eth0),tcp1(eth1)<br /><br /><br />[root@mds1 ~]# lctl list_nids<br />192.168.122.240@tcp<br />192.168.100.100@tcp1<br /><br />[root@oss1 ~]# lctl list_nids<br />192.168.122.194@tcp<br />192.168.100.101@tcp1<br /><br />[root@client ~]# lctl list_nids<br />192.168.122.70@tcp<br />192.168.100.102@tcp1<br /><br />[root@mds1 ~]# mkfs.lustre --mgs --mdt --fsname=data --index=0 --reformat /dev/sda<br /><br /><br />When formatting OST, tcp0 is used to establish the connection between OST and MGT.<br /><br />[root@oss1 ~]# mkfs.lustre --ost --mgsnode=192.168.122.240@tcp0 --fsname=data --index=0 --reformat /dev/sda<br /><br /><br />On Lustre client, I intentionally mount it with tcp1<br /><br />[root@client ~]# mount | grep lustre<br />192.168.100.100@tcp1:/data on /lustre type lustre (rw)<br /><br /><br />Now I dd a file on Lustre filesystem, you can see that tcp0 is used when writing on OST. <br />Why?<br /><br />[root@client lustre]# ifconfig eth0 | grep TX<br />          TX packets:224400 errors:0 dropped:0 overruns:0 carrier:0<br />          RX bytes:4450732 (4.2 MiB)  TX bytes:1064624772 (1015.3 MiB)<br /><br />[root@client lustre]# dd if=/dev/zero of=testfile bs=1M count=500<br /><br />[root@client lustre]# ifconfig eth0 | grep TX<br />          TX packets:337851 errors:0 dropped:0 overruns:0 carrier:0<br />          RX bytes:5578294 (5.3 MiB)  TX bytes:1596746050 (1.4 GiB)</p>
<p> </p>
<p>Regards,</p>
<p>Patrick</p>
</body></html>