<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Stroom – nfs</title>
    <link>/tags/nfs/</link>
    <description>Recent content in nfs on Stroom</description>
    <generator>Hugo -- gohugo.io</generator>
    <lastBuildDate>Mon, 12 Jul 2021 00:00:00 +0000</lastBuildDate>
    
	  <atom:link href="/tags/nfs/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Docs: NFS Installation and Configuration</title>
      <link>/docs/howtos/install/installnfshowto/</link>
      <pubDate>Mon, 12 Jul 2021 00:00:00 +0000</pubDate>
      
      <guid>/docs/howtos/install/installnfshowto/</guid>
      <description>
        
        
        &lt;h2 id=&#34;assumptions&#34;&gt;Assumptions&lt;/h2&gt;
&lt;p&gt;The following assumptions are used in this document.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the user has reasonable RHEL/Centos System administration skills&lt;/li&gt;
&lt;li&gt;installations are on Centos 7.3 minimal systems (fully patched)&lt;/li&gt;
&lt;li&gt;the user is or has deployed the example two node Stroom cluster storage hierarchy described &lt;a href=&#34;../../docs/howtos/install/installhowto/#storage-scenario&#34;&gt;here&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;the configuration of this NFS is NOT secure. It is highly recommended to improve its security in a production environment. This could include improved firewall configuration to limit NFS access, NFS4 with Kerberos etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;installation-of-nfs-software&#34;&gt;Installation of NFS software&lt;/h2&gt;
&lt;p&gt;We install NFS on each node, via

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo yum -y install nfs-utils&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

and enable the relevant services, via&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-base&#34;&gt;sudo systemctl enable rpcbind
sudo systemctl enable nfs-server
sudo systemctl enable nfs-lock
sudo systemctl enable nfs-idmap
sudo systemctl start rpcbind
sudo systemctl start nfs-server
sudo systemctl start nfs-lock
sudo systemctl start nfs-idmap
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;configuration-of-nfs-exports&#34;&gt;Configuration of NFS exports&lt;/h2&gt;
&lt;p&gt;We now export the node&amp;rsquo;s &lt;code&gt;/stroomdata&lt;/code&gt; directory (in case you want to share the working directories) by configuring /etc/exports. For simplicity sake, we will allow all nodes with the hostname nomenclature of &lt;code&gt;stroomp*.strmdev00.org&lt;/code&gt; to mount the &lt;code&gt;/stroomdata&lt;/code&gt; directory.
This means the same configuration applies to all nodes.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;# Share Stroom data directory
/stroomdata	stroomp*.strmdev00.org(rw,sync,no_root_squash)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This can be achieved with the following on both nodes&lt;/p&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo su -c &amp;#34;printf &amp;#39;# Share Stroom data directory\n&amp;#39; &amp;gt;&amp;gt; /etc/exports&amp;#34;
sudo su -c &amp;#34;printf &amp;#39;/stroomdata\tstroomp*.strmdev00.org(rw,sync,no_root_squash)\n&amp;#39; &amp;gt;&amp;gt; /etc/exports&amp;#34;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;On both nodes restart the NFS service to ensure the above export takes effect via&lt;/p&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo systemctl restart nfs-server&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;So that our nodes can offer their filesystems, we need to enable NFS access on the firewall.
This is done via&lt;/p&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo firewall-cmd --zone=public --add-service=nfs --permanent
sudo firewall-cmd --reload
sudo firewall-cmd --zone=public --list-all&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;h2 id=&#34;test-mounting&#34;&gt;Test Mounting&lt;/h2&gt;
&lt;p&gt;You should do test mounts on each node.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Node: &lt;code&gt;stroomp00.strmdev00.org&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo mount -t nfs4 stroomp01.strmdev00.org:/stroomdata/stroom-data-p01 /stroomdata/stroom-data-p01&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Node: &lt;code&gt;stroomp01.strmdev00.org&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo mount -t nfs4 stroomp00.strmdev00.org:/stroomdata/stroom-data-p00 /stroomdata/stroom-data-p00&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;If you are concerned you can&amp;rsquo;t see the mount with a &lt;code&gt;df&lt;/code&gt; try a &lt;code&gt;df --type=nfs4 -a&lt;/code&gt; or a &lt;code&gt;sudo df&lt;/code&gt;. Irrespective, once the mounting works, make the mounts permanent by adding the following to each node&amp;rsquo;s /etc/fstab file.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Node: &lt;code&gt;stroomp00.strmdev00.org&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;stroomp01.strmdev00.org:/stroomdata/stroom-data-p01 /stroomdata/stroom-data-p01 nfs4 soft,bg
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;achieved with&lt;/p&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo su -c &amp;#34;printf &amp;#39;stroomp01.strmdev00.org:/stroomdata/stroom-data-p01 /stroomdata/stroom-data-p01 nfs4 soft,bg\n&amp;#39; &amp;gt;&amp;gt; /etc/fstab&amp;#34;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Node: &lt;code&gt;stroomp01.strmdev00.org&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;stroomp00.strmdev00.org:/stroomdata/stroom-data-p00 /stroomdata/stroom-data-p00 nfs4 soft,bg
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;achieved with&lt;/p&gt;
&lt;p&gt;
  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo su -c &amp;#34;printf &amp;#39;stroomp00.strmdev00.org:/stroomdata/stroom-data-p00 /stroomdata/stroom-data-p00 nfs4 soft,bg\n&amp;#39; &amp;gt;&amp;gt; /etc/fstab&amp;#34;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

At this point reboot all processing nodes to ensure the directories mount automatically. You may need to give the nodes a minute to do this.&lt;/p&gt;
&lt;h2 id=&#34;addition-of-another-node&#34;&gt;Addition of another Node&lt;/h2&gt;
&lt;p&gt;If one needs to add another node to the cluster, lets say, &lt;code&gt;stroomp02.strmdev00.org&lt;/code&gt;, on which &lt;code&gt;/stroomdata&lt;/code&gt; follows the same storage hierarchy
as the existing nodes and all nodes have added mount points (directories) for this new node, you would take the following steps &lt;em&gt;in order&lt;/em&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Node: &lt;code&gt;stroomp02.strmdev00.org&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install NFS software as &lt;a href=&#34;../../docs/howtos/install/installnfshowto/#installation-of-nfs-software&#34;&gt;above&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Configure the exports file as per&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo su -c &amp;#34;printf &amp;#39;# Share Stroom data directory\n&amp;#39; &amp;gt;&amp;gt; /etc/exports&amp;#34;
sudo su -c &amp;#34;printf &amp;#39;/stroomdata\tstroomp*.strmdev00.org(rw,sync,no_root_squash)\n&amp;#39; &amp;gt;&amp;gt; /etc/exports&amp;#34;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Restart the NFS service and make the firewall enable NFS access as per&lt;/li&gt;
&lt;/ul&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo systemctl restart nfs-server
sudo firewall-cmd --zone=public --add-service=nfs --permanent
sudo firewall-cmd --reload
sudo firewall-cmd --zone=public --list-all&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Test mount the existing node file systems&lt;/li&gt;
&lt;/ul&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo mount -t nfs4 stroomp00.strmdev00.org:/stroomdata/stroom-data-p00 /stroomdata/stroom-data-p00
sudo mount -t nfs4 stroomp01.strmdev00.org:/stroomdata/stroom-data-p01 /stroomdata/stroom-data-p01&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Once the test mounts work, we make them permanent by adding the following to the /etc/fstab file.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;stroomp00.strmdev00.org:/home/stroomdata/stroom-data-p00 /home/stroomdata/stroom-data-p00 nfs4 soft,bg
stroomp01.strmdev00.org:/home/stroomdata/stroom-data-p01 /home/stroomdata/stroom-data-p01 nfs4 soft,bg
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;achieved with&lt;/p&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo su -c &amp;#34;printf &amp;#39;stroomp00.strmdev00.org:/stroomdata/stroom-data-p00 /stroomdata/stroom-data-p00 nfs4 soft,bg\n&amp;#39; &amp;gt;&amp;gt; /etc/fstab&amp;#34;
sudo su -c &amp;#34;printf &amp;#39;stroomp01.strmdev00.org:/stroomdata/stroom-data-p01 /stroomdata/stroom-data-p01 nfs4 soft,bg\n&amp;#39; &amp;gt;&amp;gt; /etc/fstab&amp;#34;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Node: &lt;code&gt;stroomp00.strmdev00.org&lt;/code&gt; &lt;strong&gt;and&lt;/strong&gt; &lt;code&gt;stroomp01.strmdev00.org&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Test mount the new node&amp;rsquo;s filesystem as per&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo mount -t nfs4 stroomp02.strmdev00.org:/stroomdata/stroom-data-p02 /stroomdata/stroom-data-p02&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Once the test mount works, make the mount permanent by adding the following to the /etc/fstab file&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;stroomp02.strmdev00.org:/stroomdata/stroom-data-p02 /stroomdata/stroom-data-p02 nfs4 soft,bg
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;achieved with&lt;/p&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo su -c &amp;#34;printf &amp;#39;stroomp02.strmdev00.org:/stroomdata/stroom-data-p02 /stroomdata/stroom-data-p02 nfs4 soft,bg\n&amp;#39; &amp;gt;&amp;gt; /etc/fstab&amp;#34;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


      </description>
    </item>
    
  </channel>
</rss>
