<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Script for NFS volume create and export in Network and Storage Protocols</title>
    <link>https://community.netapp.com/t5/Network-and-Storage-Protocols/Script-for-NFS-volume-create-and-export/m-p/50267#M4604</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I just want to know if someone could give me a hand or a tip or maybe someone has already done a script in Linux for creating a NFS volume and also to add the entry to the /etc/exports file in the FAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;German&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jun 2025 06:08:03 GMT</pubDate>
    <dc:creator>GERNETAPP</dc:creator>
    <dc:date>2025-06-05T06:08:03Z</dc:date>
    <item>
      <title>Script for NFS volume create and export</title>
      <link>https://community.netapp.com/t5/Network-and-Storage-Protocols/Script-for-NFS-volume-create-and-export/m-p/50267#M4604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I just want to know if someone could give me a hand or a tip or maybe someone has already done a script in Linux for creating a NFS volume and also to add the entry to the /etc/exports file in the FAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;German&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 06:08:03 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Network-and-Storage-Protocols/Script-for-NFS-volume-create-and-export/m-p/50267#M4604</guid>
      <dc:creator>GERNETAPP</dc:creator>
      <dc:date>2025-06-05T06:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Script for NFS volume create and export</title>
      <link>https://community.netapp.com/t5/Network-and-Storage-Protocols/Script-for-NFS-volume-create-and-export/m-p/50272#M4606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi mate&lt;/P&gt;&lt;P&gt;Here is the example script&lt;/P&gt;&lt;P&gt;host files should be right config on where its running script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#!/bin/bash&lt;/P&gt;&lt;P&gt;# Create the NFS volumes for the first 2 nodes on the storage systems $STORAGE1 and $STORAGE2&lt;/P&gt;&lt;P&gt;#&lt;/P&gt;&lt;P&gt;STATUS=false&lt;/P&gt;&lt;P&gt;SPACE=6000000000&lt;/P&gt;&lt;P&gt;SPACE1=0&lt;/P&gt;&lt;P&gt;SPACE2=0&lt;/P&gt;&lt;P&gt;STORAGE1="NETAPP-1"&lt;/P&gt;&lt;P&gt;STORAGE2="NETAPP-2"&lt;/P&gt;&lt;P&gt;ping -c 1 $STORAGE1 &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;/P&gt;&lt;P&gt;if [ $? != 0 ]; then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "Cannot ping the filer $STORAGE1"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit 8&lt;/P&gt;&lt;P&gt;fi&lt;/P&gt;&lt;P&gt;ping -c 1 $STORAGE2 &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;/P&gt;&lt;P&gt;if [ $? != 0 ]; then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo " Cannot ping filer $STORAGE2"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit 8&lt;/P&gt;&lt;P&gt;fi&lt;/P&gt;&lt;P&gt;echo "ping to both filer is okay"&lt;/P&gt;&lt;P&gt;SPACE1=`ssh $STORAGE1 aggr show_space |grep "Total space&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " |awk '{print $5}' | cut -d"K" -f1`&amp;nbsp; &amp;gt;/dev/null 2&amp;gt;&amp;amp;1 &lt;/P&gt;&lt;P&gt;SPACE2=`ssh $STORAGE2 aggr show_space |grep "Total space&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " |awk '{print $5}' | cut -d"K" -f1`&amp;nbsp; &amp;gt;/dev/null 2&amp;gt;&amp;amp;1 &lt;/P&gt;&lt;P&gt;echo "Available Space in aggr0 on $STORAGE1 = $SPACE1 KB"&lt;/P&gt;&lt;P&gt;echo "Available Space in aggr0 on $STORAGE2 = $SPACE2 KB"&lt;/P&gt;&lt;P&gt;if [ $SPACE1 -lt $SPACE ] ; then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "Filer $STORAGE1 does not have enough space exiting here!!!" &lt;/P&gt;&lt;P&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp; exit 8 &lt;/P&gt;&lt;P&gt;fi&lt;/P&gt;&lt;P&gt;if [ $SPACE2 -lt $SPACE ] ; then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "Filer $STORAGE2 does not have enough space exiting here!!!" &lt;/P&gt;&lt;P&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp; exit 8 &lt;/P&gt;&lt;P&gt;fi&lt;/P&gt;&lt;P&gt;echo " Creating NFS Volumes on $STORAGE1"&lt;/P&gt;&lt;P&gt;ssh $STORAGE2 vol create TEST_VOL_01 aggr0 50g&lt;/P&gt;&lt;P&gt;ssh $STORAGE2 vol options TEST_VOL_01 nosnapdir on&lt;/P&gt;&lt;P&gt;ssh $STORAGE2 vol options TEST_VOL_01 nosnap on&lt;/P&gt;&lt;P&gt;ssh $STORAGE2 exportfs -p sec=sys,rw=[fec0::]/64,root=[fec0::192:168:201:6],anon=0 /vol/TEST_VOL_01&lt;/P&gt;&lt;P&gt;ssh $STORAGE2 vol create TEST_VOL_02 aggr0 50g&lt;/P&gt;&lt;P&gt;ssh $STORAGE2 vol options TEST_VOL_02 nosnapdir on&lt;/P&gt;&lt;P&gt;ssh $STORAGE2 vol options TEST_VOL_02 nosnap on&lt;/P&gt;&lt;P&gt;ssh $STORAGE2 exportfs -p sec=sys,rw=[fec0::]/64,root=[fec0::192:168:201:6],anon=0 /vol/TEST_VOL_02&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 10:16:51 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Network-and-Storage-Protocols/Script-for-NFS-volume-create-and-export/m-p/50272#M4606</guid>
      <dc:creator>bulent_goktas</dc:creator>
      <dc:date>2013-07-19T10:16:51Z</dc:date>
    </item>
  </channel>
</rss>

