doc-exports/docs/fg/umn/functiongraph_01_0402.html
Chen, Junjie dac566cf2f FG UMN 20230725 version
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com>
Co-authored-by: Chen, Junjie <chenjunjie@huawei.com>
Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
2024-04-03 10:30:56 +00:00

113 lines
28 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<a name="functiongraph_01_0402"></a><a name="functiongraph_01_0402"></a>
<h1 class="topictitle1">Configuring Disk Mounting</h1>
<div id="body32001227"><div class="section" id="functiongraph_01_0402__en-us_topic_0000001298786853_section8983133418294"><h4 class="sectiontitle">Introduction</h4><p id="functiongraph_01_0402__en-us_topic_0000001298786853_p089015131305">FunctionGraph allows you to mount file systems to your functions. Multiple functions can share the same file system. This greatly expands the function execution and storage space compared with the temporary disk space allocated to a function.</p>
</div>
<div class="section" id="functiongraph_01_0402__en-us_topic_0000001298786853_section56701013183913"><h4 class="sectiontitle">Scenarios</h4><p id="functiongraph_01_0402__en-us_topic_0000001298786853_p510252113916">FunctionGraph supports the following types of file systems:</p>
<ul id="functiongraph_01_0402__en-us_topic_0000001298786853_ul11421617154019"><li id="functiongraph_01_0402__en-us_topic_0000001298786853_li1441515213210">SFS Turbo<p id="functiongraph_01_0402__en-us_topic_0000001298786853_p762532316220"><a name="functiongraph_01_0402__en-us_topic_0000001298786853_li1441515213210"></a><a name="en-us_topic_0000001298786853_li1441515213210"></a>SFS Turbo supports the following storage classes: Standard (500 GB32 TB), Standard-Enhanced (10 TB320 TB), Performance (500 GB32 TB), and Performance-Enhanced (10 TB320 TB). SFS Turbo is expandable to 320 TB, and provides fully hosted shared file storage. It features high availability and durability, and supports massive quantities of small files and applications requiring low latency and high input/output operations per second (IOPS). SFS Turbo is suitable for high-performance websites, log storage, compression and decompression, DevOps, enterprise offices, and containerized applications. For details, see <em id="functiongraph_01_0402__en-us_topic_0000001298786853_i247261261319">SFS Service Overview</em>.</p>
</li><li id="functiongraph_01_0402__en-us_topic_0000001298786853_li1068414181535">ECS<p id="functiongraph_01_0402__en-us_topic_0000001298786853_p1320019288312"><a name="functiongraph_01_0402__en-us_topic_0000001298786853_li1068414181535"></a><a name="en-us_topic_0000001298786853_li1068414181535"></a>A directory on an ECS is specified as a shared file system (see <a href="#functiongraph_01_0402__en-us_topic_0000001298786853_section11158112711472">Mounting an ECS Shared Directory</a>) by using the network file system (NFS) service. The directory can then be mounted to a function in the same VPC as the ECS so that the function can read and write data in the directory. ECS file systems make it possible for dynamic expansion of compute resources. This type of file system is suitable for low service demand scenarios.</p>
</li></ul>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_p310212123911">Benefits from using these file systems:</p>
<ul id="functiongraph_01_0402__en-us_topic_0000001298786853_ul05225834115"><li id="functiongraph_01_0402__en-us_topic_0000001298786853_li1522385417">The function execution space can be greatly expanded comparing with <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b15887439516">/tmp</strong>.</li><li id="functiongraph_01_0402__en-us_topic_0000001298786853_li8611811195511">A file system can be shared by multiple functions.</li><li id="functiongraph_01_0402__en-us_topic_0000001298786853_li101221245144116">ECS compute resources can be dynamically expanded and existing ECS storage capability can be used to achieve stronger computing performance.<div class="note" id="functiongraph_01_0402__en-us_topic_0000001298786853_note11602135113185"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="functiongraph_01_0402__en-us_topic_0000001298786853_p1244614471218">You can write temporary files in the <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b1642584564316">/tmp</strong> directory. The total size of these files cannot exceed 10,240 MB.</p>
</div></div>
</li></ul>
</div>
<div class="section" id="functiongraph_01_0402__en-us_topic_0000001298786853_section20160164412551"><a name="functiongraph_01_0402__en-us_topic_0000001298786853_section20160164412551"></a><a name="en-us_topic_0000001298786853_section20160164412551"></a><h4 class="sectiontitle">Creating an Agency</h4><p id="functiongraph_01_0402__en-us_topic_0000001298786853_p82626422579">Before adding file systems to a function, specify an agency with permissions for accessing the file system services for the function.</p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_p1298413125613">There is a limit on the maximum number of agencies you can create, and cloud service agencies cannot be modified. Therefore, you are advised to create an agency with high-level permissions, for example, <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b1576134195413">Tenant Administrator</strong>, to allow a function to access all resources in the selected region. For more information, see <a href="functiongraph_01_0920.html#functiongraph_01_0920">Configuring Agency Permissions</a>.</p>
</div>
<div class="section" id="functiongraph_01_0402__en-us_topic_0000001298786853_section457221344513"><h4 class="sectiontitle">Mounting an SFS Turbo File System</h4><p id="functiongraph_01_0402__en-us_topic_0000001298786853_p9119021134516"><strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b534763812154">Setting an Agency</strong></p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_p12982916121716">Before mounting an SFS Turbo file system to a function, specify an agency that has been granted <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b14791727584">SFS Administrator</strong> and <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b175247302816">VPC Administrator</strong> permissions for the function. If no agencies are available, create one in IAM.</p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_p3196191284614"><strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b3186911152115">Configuring VPC Access</strong></p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_p37033251418">An SFS Turbo file system is accessible only in the VPC where it has been created. Before mounting such a file system to a function, enable VPC access for the function.</p>
<ol id="functiongraph_01_0402__en-us_topic_0000001298786853_ol162661216101213"><li id="functiongraph_01_0402__en-us_topic_0000001298786853_li152661816111216"><a name="functiongraph_01_0402__en-us_topic_0000001298786853_li152661816111216"></a><a name="en-us_topic_0000001298786853_li152661816111216"></a>On the SFS console, obtain the information about the VPC and subnet where a file system is to be mounted to your function. For details, see "File System Management".</li><li id="functiongraph_01_0402__en-us_topic_0000001298786853_li16732735151410">Enable VPC access by referring to <a href="functiongraph_01_0222.html#functiongraph_01_0222">Configuring the Network</a> and enter the VPC and subnet obtained in <a href="#functiongraph_01_0402__en-us_topic_0000001298786853_li152661816111216">1</a>.</li></ol>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_p61161452164613"><strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b131683363264">Mounting an SFS Turbo File System</strong></p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_p15670181154719">SFS Turbo file systems can be mounted in the same way as SFS file systems. Select a file system and set the access path.</p>
</div>
<div class="section" id="functiongraph_01_0402__en-us_topic_0000001298786853_section11158112711472"><a name="functiongraph_01_0402__en-us_topic_0000001298786853_section11158112711472"></a><a name="en-us_topic_0000001298786853_section11158112711472"></a><h4 class="sectiontitle">Mounting an ECS Shared Directory</h4><p id="functiongraph_01_0402__en-us_topic_0000001298786853_p474310353471"><strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b11918601525">Specifying an Agency</strong></p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_p9396455194717">Before mounting an ECS shared directory to a function, specify an agency that has been granted <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b15569142016329">Tenant Guest</strong> and <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b19196152417320">VPC Administrator</strong> permissions for the function. If no agencies are available, create one in IAM. For details, see <a href="#functiongraph_01_0402__en-us_topic_0000001298786853_section20160164412551">Creating an Agency</a>.</p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_p14396655104715"><strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b131421724151111">Configuring VPC Access</strong></p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_p911671515481">Before adding an ECS shared directory, specify the VPC where the ECS is deployed. View the VPC information on the details page of the ECS. Click the VPC name to go to the VPC details page, and view the subnet.</p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_p8116151518485">Set the acquired VPC and subnet for the function.</p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_p185111994812"><strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b1098712551611">Mounting an ECS Directory</strong></p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_p8659644194812">Enter a shared directory and function access path.</p>
<div class="fignone" id="functiongraph_01_0402__en-us_topic_0000001298786853_fig69091244259"><span class="figcap"><b>Figure 1 </b>Setting the path</span><br><span><img id="functiongraph_01_0402__en-us_topic_0000001298786853_image8601445150" src="en-us_image_0000001304635949.png"></span></div>
</div>
<div class="section" id="functiongraph_01_0402__en-us_topic_0000001298786853_section347063194911"><h4 class="sectiontitle">Follow-up Operations</h4><p id="functiongraph_01_0402__en-us_topic_0000001298786853_p1986232372517">A function can read and write data in an access path in the same way as in the mounted file system.</p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_p787011020267">Function logs can be persisted by configuring the log path as a subdirectory in the access path.</p>
<div class="fignone" id="functiongraph_01_0402__en-us_topic_0000001298786853_fig61111340818"><span class="figcap"><b>Figure 2 </b>Function template</span><br><span><img id="functiongraph_01_0402__en-us_topic_0000001298786853_image1128349812" src="en-us_image_0000001630536208.png"></span></div>
</div>
<div class="section" id="functiongraph_01_0402__en-us_topic_0000001298786853_section13985217105113"><h4 class="sectiontitle">Creating an NFS Shared Directory on ECS</h4><ol id="functiongraph_01_0402__en-us_topic_0000001298786853_ol6838717155018"><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li926917221331"><strong id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_b4701181993211">Linux</strong><ul id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_ul1655922355412"><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li1755912234546">CentOS, SUSE, EulerOS, Fedora, or openSUSE<ol type="a" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_ol1459615543419"><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li1159715424113">Configure a YUM repository.<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p958961017598"><a name="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li1159715424113"></a><a name="en-us_topic_0000001298786853_en-us_topic_0000001174894772_li1159715424113"></a>1. Create a file named <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b13643122113384">euleros.repo</strong> in the <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b16650192117386">/etc/yum.repos.d</strong> directory. Ensure that the file name must end with <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b156501721133817">.repo</strong>.</p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p12276122913435">2. Run the following command to enter <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b146321024103816">euleros.repo</strong> and edit the configuration:</p>
<pre class="screen" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_screen10419194213011">vi /etc/yum.repos.d/euleros.repo</pre>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p69982198220">The EulerOS 2.0 SP3 YUM configuration is as follows:</p>
<pre class="screen" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_screen128236131517">[base]
name=EulerOS-2.0SP3 base
baseurl=http://repo.cloud.com/euler/2.3/os/x86_64/
enabled=1
gpgcheck=1
gpgkey=http://repo.cloud.com/euler/2.3/os/RPM-GPG-KEY-EulerOS</pre>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p8675184202416">The EulerOS 2.0 SP5 YUM configuration is as follows:</p>
<pre class="screen" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_screen15994123512313">[base]
name=EulerOS-2.0SP5 base
baseurl=http://repo.cloud.com/euler/2.5/os/x86_64/
enabled=1
gpgcheck=1
gpgkey=http://repo.cloud.com/euler/2.5/os/RPM-GPG-KEY-EulerOS</pre>
<div class="note" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_note14391625173318"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p643922511335">Parameter description:</p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p12440112553315"><strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b1508953605105633">name</strong>: repository name</p>
<div class="p" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p2440182516335"><strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b620649962105633">baseurl</strong>: URL of the repository<ul id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_ul444072520330"><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li6440202523318">HTTP-based network address: <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b270317367105633">http://path/to/repo</strong></li><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li4440112563313">Local repository address: <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b2126022386105633">file:///path/to/local/repo</strong></li></ul>
</div>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p1444092593317"><strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b1346134811382">gpgcheck</strong>: indicates whether to enable the GNU privacy guard (GPG) to check the validity and security of RPM package resources. <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b12635195116380">0</strong>: The GPG check is disabled. <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b063575133818">1</strong>: The GPG check is enabled. If this option is not specified, the GPG check is enabled by default.</p>
</div></div>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p15823113155113">3. Save the configurations.</p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p115611831014">4. Run the following command to clear the cache:</p>
<pre class="screen" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_screen7122510171112">yum clean all</pre>
</li><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li14485165974116">Run the following command to install nfs-utils:<pre class="screen" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_screen2852125054116">yum install nfs-utils</pre>
</li><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li250710590412">Create a shared directory.<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p1507115954115"><a name="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li250710590412"></a><a name="en-us_topic_0000001298786853_en-us_topic_0000001174894772_li250710590412"></a>When you open <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b147223166392">/etc/exports</strong> and need to create shared directory <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b13723111643917">/sharedata</strong>, add the following configuration:</p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p05071859154113">/sharedata 192.168.0.0/24(rw,sync,no_root_squash)</p>
<div class="note" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_note17507159104112"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p55071159164118">The preceding configuration is used to share the <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b163351819173916">/sharedata</strong> directory with other servers in the <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b233691916393">192.168.0.0/24</strong> subnet.</p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_p186336426229">After the preceding command is run, run the <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b168471735154713">exportfs -v</strong> command to view the shared directory and check whether the setting is successful.</p>
</div></div>
</li><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li3530812428">Run the following commands to start the NFS service:<pre class="screen" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_screen1782216214210">systemctl start rpcbind
service nfs start</pre>
</li><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li13666811428">Create another shared directory.<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p186598164214"><a name="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li13666811428"></a><a name="en-us_topic_0000001298786853_en-us_topic_0000001174894772_li13666811428"></a>For example, to create the <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b968562853918">/home/myself/download</strong> directory, add the following configuration to <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b76851428123916">/etc/exports</strong>:</p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p1465118154210">/home/myself/download 192.168.0.0/24(rw,sync,no_root_squash)</p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p19651487429">Restart the NFS service.</p>
<pre class="screen" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_screen10656844219">service nfs restart</pre>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p1265138174211">Alternatively, run the following command without restarting the NFS service:</p>
<pre class="screen" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_screen1565158104210">exportfs -rv</pre>
</li><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li118471110164212">(Optional) Enable automatic startup of the rpcbind service.<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p1846121024219"><a name="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li118471110164212"></a><a name="en-us_topic_0000001298786853_en-us_topic_0000001174894772_li118471110164212"></a>Run the following command:</p>
<pre class="screen" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_screen138471110164217">systemctl enable rpcbind</pre>
</li></ol>
</li><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li12929135919328"><strong id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_b114538438321">Ubuntu</strong><ol type="a" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_ol9647184745711"><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li17647247185716">Run the following commands to install nfs-kernel-server:<pre class="screen" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_screen490310578111">sudo apt-get update
sudo apt install nfs-kernel-server</pre>
</li><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li2035255295715">Create a shared directory.<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p17812113819587"><a name="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li2035255295715"></a><a name="en-us_topic_0000001298786853_en-us_topic_0000001174894772_li2035255295715"></a>When you open <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b805252716105633">/etc/exports</strong> and need to create shared directory <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b485678726105633">/sharedata</strong>, add the following configuration:</p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p2081233819586">/sharedata 192.168.0.0/24(rw,sync,no_root_squash)</p>
<div class="note" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_note1228691821"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p1614954765619">The preceding configuration is used to share the <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b501162162105633">/sharedata</strong> directory with other servers in the <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b147209897105633">192.168.0.0/24</strong> subnet.</p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_p16880111332311">After the preceding command is run, run the <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b12363174210482">exportfs -v</strong> command to view the shared directory and check whether the setting is successful.</p>
</div></div>
</li><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li218715519576">Start the NFS service.<pre class="screen" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_screen293517551228">service nfs-kernel-server restart</pre>
</li><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li36683553588">Create another shared directory.<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p651174195915"><a name="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li36683553588"></a><a name="en-us_topic_0000001298786853_en-us_topic_0000001174894772_li36683553588"></a>For example, to create the <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b2069218412105633">/home/myself/download</strong> directory, add the following configuration to <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b261170811105633">/etc/exports</strong>:</p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p1351144118592">/home/myself/download 192.168.0.0/24(rw,sync,no_root_squash)</p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p18515419591">Restart the NFS service.</p>
<pre class="screen" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_screen1655867733">service nfs restart</pre>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p55124125915">Alternatively, run the following command without restarting the NFS service:</p>
<pre class="screen" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_screen4887511635">exportfs -rv</pre>
</li></ol>
</li></ul>
</li></ol><ol start="2" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_ol6538141411344"><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li353861493419"><strong id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_b201410224345">Windows</strong></li></ol>
<ol id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_ol18297249183319"><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li1829613494338">Install the NFS server.<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p11296349173316"><a name="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li1829613494338"></a><a name="en-us_topic_0000001298786853_en-us_topic_0000001174894772_li1829613494338"></a>Paid software: haneWIN. Download the software at the <a href="https://www.hanewin.net/nfs-e.htm" target="_blank" rel="noopener noreferrer">haneWIN official website</a>.</p>
<p id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_p72963498334">Free software: FreeNFS and WinNFSd. Download the software at the <a href="https://sourceforge.net/projects/winnfsd/" target="_blank" rel="noopener noreferrer">SourceForge website</a>.</p>
</li><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li17297114913339">Enable the NFS function.<ul id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_ul1829720499335"><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li1929774953319">In the case of WinNFSd, see <a href="https://github.com/winnfsd/winnfsd" target="_blank" rel="noopener noreferrer">WinNFSd configuration</a>.</li><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li132975498332">In the case of haneWIN, perform the following steps:<ol type="a" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_ol2297949143315"><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li729719492338">Run <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b279655883105633">nfsctl.exe</strong> as the Windows administrator.</li><li id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_li1297194919337">Right-click in the blank area and choose <strong id="functiongraph_01_0402__en-us_topic_0000001298786853_b994693889105633">Insert</strong> from the shortcut menu.<div class="fignone" id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_fig42971549193319"><span class="figcap"><b>Figure 3 </b>Insert</span><br><span><img id="functiongraph_01_0402__en-us_topic_0000001298786853_en-us_topic_0000001174894772_image182971649163318" src="en-us_image_0000001298507525.png"></span></div>
</li></ol>
</li></ul>
</li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="functiongraph_01_0300.html">Configuring Functions</a></div>
</div>
</div>