<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>NFS on HiDa</title><link>https://www.0niu.cn/tags/nfs/</link><description>Recent content in NFS on HiDa</description><generator>Hugo -- gohugo.io</generator><language>zh</language><lastBuildDate>Wed, 11 Oct 2023 08:56:16 +0800</lastBuildDate><atom:link href="https://www.0niu.cn/tags/nfs/index.xml" rel="self" type="application/rss+xml"/><item><title>Debian12 配置 NFS Server 静态挂载端口</title><link>https://www.0niu.cn/posts/nfs-static-mount-port-in-debian12/</link><pubDate>Wed, 11 Oct 2023 08:56:16 +0800</pubDate><guid>https://www.0niu.cn/posts/nfs-static-mount-port-in-debian12/</guid><description>&lt;p>因为要配置防火墙，需要固定NFS mount的绑定端口。之前的做法是配置&lt;code>/etc/default/nfs-kernel-server&lt;/code>，配置&lt;code>RPCMOUNTDOPTS=&amp;quot;--manage-gids -p 2050&amp;quot;&lt;/code>。现在该配置文件已经失效，需要修改&lt;code>/etc/nfs.conf&lt;/code>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>[mountd]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span># debug=&amp;#34;all|auth|call|general|parse&amp;#34;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>manage-gids=y
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span># descriptors=0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>port=2050
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description><content>&lt;p>因为要配置防火墙，需要固定NFS mount的绑定端口。之前的做法是配置&lt;code>/etc/default/nfs-kernel-server&lt;/code>，配置&lt;code>RPCMOUNTDOPTS=&amp;quot;--manage-gids -p 2050&amp;quot;&lt;/code>。现在该配置文件已经失效，需要修改&lt;code>/etc/nfs.conf&lt;/code>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>[mountd]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span># debug=&amp;#34;all|auth|call|general|parse&amp;#34;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>manage-gids=y
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span># descriptors=0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>port=2050
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></content></item></channel></rss>