<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sybase数据库技术，数据库恢复专家 &#187; nfs</title>
	<atom:link href="http://www.dbainfo.net/tag/nfs/feed" rel="self" type="application/rss+xml" />
	<link>https://www.dbainfo.net</link>
	<description>提供Sybase ASE及Sybase SQL Anywhere数据库修复服务，电话：13811580958(微信)，QQ：289965371！We have many years of experience in recovering data from damanged Sybase devices. Contact us by Phone: +86 13811580958 Wechat: 13811580958 Email: 289965371@qq.com</description>
	<lastBuildDate>Sat, 14 Jun 2025 16:28:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>NFS mount failed, reason given by server: Permission denied</title>
		<link>https://www.dbainfo.net/nfs-mount-failed-reason-given-by-server-permission-denied.htm</link>
		<comments>https://www.dbainfo.net/nfs-mount-failed-reason-given-by-server-permission-denied.htm#comments</comments>
		<pubDate>Tue, 23 Aug 2011 03:31:24 +0000</pubDate>
		<dc:creator>dbainfo</dc:creator>
				<category><![CDATA[Unix&Linux]]></category>
		<category><![CDATA[nfs]]></category>

		<guid isPermaLink="false">http://www.dbainfo.net/?p=937</guid>
		<description><![CDATA[在CentOS5.6上mount一个NFS目录时报错： [root@vm-centos4 ~]# mount -t nfs 10.0.0.1:/media /media mount: 10.0.0.1:/media failed, reason given by server: Permission denied 在NFS服务器上，检查/etc/exports配置文件的内容： [root@vm-centos yum.repos.d]# cat /etc/exports /media&#160; *(rw) 检查NFS服务是否运行正常： [root@vm-centos yum.repos.d]# rpcinfo -p &#160;&#160; program vers proto&#160;&#160; port &#160;&#160;&#160; 100000&#160;&#160;&#160; 2&#160;&#160; tcp&#160;&#160;&#160; 111&#160; portmapper &#160;&#160;&#160; 100000&#160;&#160;&#160; 2&#160;&#160; udp&#160;&#160;&#160; 111&#160; portmapper &#160;&#160;&#160; 100024&#160;&#160;&#160; 1&#160;&#160; udp&#160;&#160;&#160; 873&#160; status &#160;&#160;&#160; 100024&#160;&#160;&#160; 1&#160;&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>在CentOS5.6上mount一个NFS目录时报错：</p>
<blockquote>
<p>[root@vm-centos4 ~]# mount -t nfs 10.0.0.1:/media /media <br />
		<span style="color:#(color);"><strong>mount: 10.0.0.1:/media failed, reason given by server: Permission denied</strong></span></p>
</blockquote>
<p>在NFS服务器上，检查/etc/exports配置文件的内容：</p>
<blockquote>
<p>[root@vm-centos yum.repos.d]# cat /etc/exports<br />
		/media&nbsp; *(rw)</p>
</blockquote>
<p>检查NFS服务是否运行正常：</p>
<blockquote>
<p>[root@vm-centos yum.repos.d]# rpcinfo -p<br />
		&nbsp;&nbsp; program vers proto&nbsp;&nbsp; port<br />
		&nbsp;&nbsp;&nbsp; 100000&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp; tcp&nbsp;&nbsp;&nbsp; 111&nbsp; portmapper<br />
		&nbsp;&nbsp;&nbsp; 100000&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp; udp&nbsp;&nbsp;&nbsp; 111&nbsp; portmapper<span id="more-937"></span><br />
		&nbsp;&nbsp;&nbsp; 100024&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; udp&nbsp;&nbsp;&nbsp; 873&nbsp; status<br />
		&nbsp;&nbsp;&nbsp; 100024&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; tcp&nbsp;&nbsp;&nbsp; 876&nbsp; status<br />
		&nbsp;&nbsp;&nbsp; 100021&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; udp&nbsp; 41787&nbsp; nlockmgr<br />
		&nbsp;&nbsp;&nbsp; 100021&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp; udp&nbsp; 41787&nbsp; nlockmgr<br />
		&nbsp;&nbsp;&nbsp; 100021&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp; udp&nbsp; 41787&nbsp; nlockmgr<br />
		&nbsp;&nbsp;&nbsp; 100021&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; tcp&nbsp; 48666&nbsp; nlockmgr<br />
		&nbsp;&nbsp;&nbsp; 100021&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp; tcp&nbsp; 48666&nbsp; nlockmgr<br />
		&nbsp;&nbsp;&nbsp; 100021&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp; tcp&nbsp; 48666&nbsp; nlockmgr<br />
		&nbsp;&nbsp;&nbsp; 100011&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; udp&nbsp;&nbsp;&nbsp; 829&nbsp; rquotad<br />
		&nbsp;&nbsp;&nbsp; 100011&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp; udp&nbsp;&nbsp;&nbsp; 829&nbsp; rquotad<br />
		&nbsp;&nbsp;&nbsp; 100011&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; tcp&nbsp;&nbsp;&nbsp; 832&nbsp; rquotad<br />
		&nbsp;&nbsp;&nbsp; 100011&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp; tcp&nbsp;&nbsp;&nbsp; 832&nbsp; rquotad<br />
		&nbsp;&nbsp;&nbsp; 100003&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp; udp&nbsp;&nbsp; 2049&nbsp; nfs<br />
		&nbsp;&nbsp;&nbsp; 100003&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp; udp&nbsp;&nbsp; 2049&nbsp; nfs<br />
		&nbsp;&nbsp;&nbsp; 100003&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp; udp&nbsp;&nbsp; 2049&nbsp; nfs<br />
		&nbsp;&nbsp;&nbsp; 100003&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp; tcp&nbsp;&nbsp; 2049&nbsp; nfs<br />
		&nbsp;&nbsp;&nbsp; 100003&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp; tcp&nbsp;&nbsp; 2049&nbsp; nfs<br />
		&nbsp;&nbsp;&nbsp; 100003&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp; tcp&nbsp;&nbsp; 2049&nbsp; nfs<br />
		&nbsp;&nbsp;&nbsp; 100005&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; udp&nbsp;&nbsp;&nbsp; 842&nbsp; mountd<br />
		&nbsp;&nbsp;&nbsp; 100005&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; tcp&nbsp;&nbsp;&nbsp; 845&nbsp; mountd<br />
		&nbsp;&nbsp;&nbsp; 100005&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp; udp&nbsp;&nbsp;&nbsp; 842&nbsp; mountd<br />
		&nbsp;&nbsp;&nbsp; 100005&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp; tcp&nbsp;&nbsp;&nbsp; 845&nbsp; mountd<br />
		&nbsp;&nbsp;&nbsp; 100005&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp; udp&nbsp;&nbsp;&nbsp; 842&nbsp; mountd<br />
		&nbsp;&nbsp;&nbsp; 100005&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp; tcp&nbsp;&nbsp;&nbsp; 845&nbsp; mountd</p>
</blockquote>
<p>检查NFS服务器提供服务的目录：</p>
<blockquote>
<p>[root@vm-centos yum.repos.d]# showmount -e 10.0.0.1<br />
		Export list for 10.0.0.1:<br />
		/media *</p>
</blockquote>
<p>
	防火墙也已经关闭，/etc/hosts.allow&nbsp; 和 /etc/hosts.deny两个文件都是空的。</p>
<p>以上都没有问题！</p>
<p>
	检查/var/log/messages发现有下面的错误信息：</p>
<p>Aug 23 10:18:20 vm-centos mountd[2545]: authenticated mount request from 10.0.0.2:876 for /media (/media)<br />
	Aug 23 10:18:20 vm-centos mountd[2545]: Cannot export /media, possibly unsupported filesystem or fsid= required<br />
	Aug 23 10:18:22 vm-centos mountd[2545]: authenticated mount request from 10.0.0.4:730 for /media (/media)<br />
	Aug 23 10:18:22 vm-centos mountd[2545]: Cannot export /media, possibly unsupported filesystem or fsid= required<br />
	Aug 23 10:19:34 vm-centos mountd[2630]: authenticated mount request from 10.0.0.3:731 for /media (/media)<br />
	Aug 23 10:19:34 vm-centos mountd[2630]: Cannot export /media, possibly unsupported filesystem or fsid= required<br />
	Aug 23 10:24:23 vm-centos mountd[2630]: authenticated mount request from 10.0.0.2:958 for /media (/media)<br />
	Aug 23 10:24:23 vm-centos mountd[2630]: <span style="color:#f00;">Cannot export /media, possibly unsupported filesystem or fsid= required</span></p>
<p>	问题在于：<span style="color:#f00;"> possibly unsupported filesystem or fsid= required</span></p>
<p><span style=""><span>在</span></span><span style=""><span>/etc/fstab中添加</span></span><span style="color:#(color);"><span>以下两行：</span></span></p>
<blockquote>
<p><span style="color:#f00;"><strong>nfsd /proc/fs/nfsd nfsd auto,defaults 0 0<br />
		sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs auto,defaults 0 0<br />
		</strong></span></p>
</blockquote>
<p><span style=""><span>重启nfs服务。</span></span></p>
<p>重新mount NFS目录，</p>
<blockquote>
<p>[root@vm-centos4 ~]# mount -t nfs 10.0.0.1:/media /media<br />
		FS-Cache: Loaded</p>
</blockquote>
<p>问题解决。</p>
<p>------------------------------------------------------------------------------------------------------------------</p>
<p>另外，mount: NFS failed, reason given by server: Permission denied这个错误也有可能是主机名解析导致的。</p>
<p>这也是Rachel提到的，首先是因为因为<a href="http://mlsx.xplore.cn/read.php/785.htm" target="_blank">系统自动挂载会报not route to host的错误</a>，我当时说，那要不你把客户端ip和对应的主机名写入到/etc/hosts文件里好了。<br />
	于是所有的机器都执行了这个操作，结果发现现在干脆mount不上来了，报的错误就是标题所说的：</p>
<p>	<i>mount: 192.168.1.100:/home/test failed, reason given by server: Permission denied</i></p>
<p>	后来去掉/etc/hosts里添加的那些IP/主机名对就可以了。<br />
	只是那个not route to host的问题还是没有解决。</p>
<p>	今天上午已经解决了not route to host的问题，主要原因是网络还没有完全准备好。</p>
<p>	对于增加了IP/主机名对后，mount报错的，当时我的猜测是因为NFS会先把IP地址转成对应的主机名，然后用这个主机名去匹配/etc/exports文件，而该文件都是设置IP段的，当然就没有权限mount。通过查阅资料和测试，证实了我的这个猜测。</p>
<p>	另外才测试过程中，如果使用主机名或者全质量主机名(FQDN)来mount NFS 文件系统，会比单纯使用IP要快得多。<br />
	因此，如果使用NFS服务的局域网内添加一个DNS服务，然后采用全质量主机名的方式来访问，应该效果会好得多。</p>
<p>	有关NFS的资料，下面两个链接推荐大家看看</p>
<p>	http://linux.vbird.org/linux_server/0330nfs.php</p>
<p>http://nfs.sourceforge.net/nfs-howto/</p>
<p>参考：<a href="http://blog.wgzhao.com/2007/10/11/NFS-wrong-reason-given-by-server-Permission-denied-for-another-reason.html" onclick="window.open(this.href, '', 'resizable=no,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=no,dependent=no'); return false;">NFS错误reason given by server: Permission denied的另外一种原因</a></p>
<p>参考：<a href="http://hi.baidu.com/ostech/blog/item/8f1d9675eabbb715b151b92f.html" onclick="window.open(this.href, '', 'resizable=no,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=no,dependent=no'); return false;">NFS挂载失败问题：NFS mount failed, reason given by server: Permission denied</a></p>
<div style="clear: both; margin: 10px 0pt; border: 1px dashed rgb(153, 153, 153); font-size: 12px; padding: 5px 10px;">
<li>本文链接地址：<a href="https://www.dbainfo.net/nfs-mount-failed-reason-given-by-server-permission-denied.htm">https://www.dbainfo.net/nfs-mount-failed-reason-given-by-server-permission-denied.htm</a>；</li>
<li>本文为dbainfo个人原创，请在尊重作者劳动成果的前提下进行转载；</li>
<li>转载务必注明原始出处 : <a href="https://www.dbainfo.net/">Sybase数据库技术，数据库恢复专家</a>；</li>
<li>对《<a href="https://www.dbainfo.net/nfs-mount-failed-reason-given-by-server-permission-denied.htm">NFS mount failed, reason given by server: Permission denied</a>》有何疑问或见解，请在本文下方发表；</li>
<li>对网站还有其他问题或建议，请提交在<a href="https://www.dbainfo.net/messages" target="_blank">留言板</a>，谢谢！</li>
</div>
<h2  class="related_post_title">随机日志</h2><ul class="related_post"><li>2010-02-05 -- <a href="https://www.dbainfo.net/start-ase-engine-by-isql-command.htm" title="通过ASE本身的命令重新启动ASE[转]">通过ASE本身的命令重新启动ASE[转]</a> (0)</li><li>2009-12-10 -- <a href="https://www.dbainfo.net/sybase-ase15-shutdown-suspended.htm" title="遇到Sybase ASE15 shutdown无法进行的问题">遇到Sybase ASE15 shutdown无法进行的问题</a> (0)</li><li>2015-03-08 -- <a href="https://www.dbainfo.net/sap-ase-cr-number-6.htm" title="SAP Adaptive Server Enterprise的所有已知BUG列表（6）">SAP Adaptive Server Enterprise的所有已知BUG列表（6）</a> (0)</li><li>2010-05-31 -- <a href="https://www.dbainfo.net/ase-split-page-3ways-identity-setrowcount-temptable.htm" title="ASE中数据结果集分页功能的三种实现方法">ASE中数据结果集分页功能的三种实现方法</a> (0)</li><li>2010-08-07 -- <a href="https://www.dbainfo.net/identity-sqlserver-release.htm" title="如何识别 SQL Server 的版本">如何识别 SQL Server 的版本</a> (0)</li><li>2010-06-01 -- <a href="https://www.dbainfo.net/sybase-ase-isql-login-failed-feedbacks.htm" title="Sybase ASE中用isql连接数据库失败时的错误信息所反馈的信息">Sybase ASE中用isql连接数据库失败时的错误信息所反馈的信息</a> (0)</li><li>2010-03-10 -- <a href="https://www.dbainfo.net/xmanager-cannot-login-solaris10.htm" title="解决xmanager不能远程登录Solaris10主机的问题[转]">解决xmanager不能远程登录Solaris10主机的问题[转]</a> (0)</li><li>2009-11-18 -- <a href="https://www.dbainfo.net/sybase-dbcc-traceflags.htm" title="整理的Sybase Dbcc traceflags">整理的Sybase Dbcc traceflags</a> (0)</li><li>2011-08-30 -- <a href="https://www.dbainfo.net/sybase-ase12-5-client-tool-sybase-central-without-installation-version.htm" title="免安装（绿色版）的Sybase ASE12.5附带的客户端工具Sybase Central v3.2">免安装（绿色版）的Sybase ASE12.5附带的客户端工具Sybase Central v3.2</a> (3)</li><li>2015-03-08 -- <a href="https://www.dbainfo.net/sap-pb-cr-number-3.htm" title="SAP PB Enterprise的所有已知BUG列表（3）">SAP PB Enterprise的所有已知BUG列表（3）</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>https://www.dbainfo.net/nfs-mount-failed-reason-given-by-server-permission-denied.htm/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
