LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1849|回复: 1

sunrpc

[复制链接]
发表于 2008-7-14 21:48:01 | 显示全部楼层 |阅读模式
Just want to make that I got it right.

1. SUNRPC was built-in to the Kernel

[root at RHFC3-1PAG01 linux-2.6.12]# cat .config | grep SUNRPC
CONFIG_SUNRPC=y
CONFIG_SUNRPC_GSS=y

2. Update /etc/init.d/rpcidmapd script to avoid check for SUNRPC module.
I modified /etc/inint.d/rpcidmapd file so it does not do exit 1 if no sunrpc
was found

        # Load sunrpc which mounts the rpc_pipes fs.
        echo Load sunrpc which mounts the rpc_pipes fs.
        [ -x /sbin/lsmod -a -x /sbin/modprobe ] && {
               if ! /sbin/lsmod | grep sunrpc > /dev/null ; then
                        /sbin/modprobe sunrpc # || exit 1
               fi
        }

3. Now message that I'm getting looks different (I added some extra
commets):

Make sure the daemon is not already running.
Starting NFS4 idmapd:
Load sunrpc which mounts the rpc_pipes fs.
FATAL: Module sunrpc not found.
FATAL: Error running install command for sunrpc
Make sure the mount worked.
Error: RPC MTAB does not exist.

Note:
There is /etc/mtab file, but I'm not sure if it is related to this process
or not.

4. idmapd demon is not working:

[root at RHFC3-1PAG01 init.d]# ./rpcidmapd status
rpc.idmapd is stopped

[root at RHFC3-1PAG01 init.d]# ps -ef | grep idmap
root      3519  3124  0 11:47 pts/3    00:00:00 grep idmap

5. Here are the questions that I have:
A) In the stage where I have just my Kernel and did not configured any thing
else. Can someone give the definite answer if both "SUNRPC" and "RPC MTAB"
type error messages can be ignored?
B) If this messages can be ignored, then problems arise because rpc.idmapd
demon does not start because of these errors. What should be done then?

Your comments and help will be appreciated greatly.

Best regards,

Rinat

-----Original Message-----
From: J. Bruce Fields [mailto:bfields at fieldses.org]
Sent: Friday, July 01, 2005 3:01 PM
To: yangurazov, rinat
Cc: nfsv4 at linux-nfs.org
Subject: Re: "Starting NFSv4 idmapd: FATAL: Module sunrpc not found." mes
sage at boot time - follow-up

On Fri, Jul 01, 2005 at 02:58:16PM -0400, yangurazov, rinat wrote:
> Does it mean that message: "Starting NFSv4 idmapd: FATAL: Module sunrpc
not
> found." can be totally ignored?

You do need to make sure that idmapd is run.  So you probably to edit
the rpcidmapd initscript to disable the check for the sunrpc module.

> Should I delete /etc/rc.d/rc5.d/S19rpcidmapd -> ../init.d/rpcidmapd link
to
> avoid this message at boot time?

No, don't do that.
 楼主| 发表于 2008-7-14 21:49:20 | 显示全部楼层
我相信很多linux的初学者,或者接触时间不长的同志们都是编译过内核的,而且由于这样那样的原因,需要使用NFS服务,在启动NFS服务的时候就会遇到下面提示:

Starting NFS4 idmapd: FATAL: Module sunrpc not found.
FATAL: Error running install command for sunrpc

问题很明确,就是sunrpc这个模块没有找到。很多人会很奇怪,编译的时候已经选择了,而且在.config文件中都可以看见:

# cat -n .config | grep SUNRPC
1555 CONFIG_SUNRPC=y
1556 CONFIG_SUNRPC_GSS=y
其实问题就在这,nfs要找的模块被编译到内核中了,而不是一个模块。

到此,问题是找到了,可是怎么解决了,如何将SUNRPC编译成一个模块了,我曾经尝试了很多办法,甚至于直接修改.config文件,但是每次进行make的时候,sunrpc自动的更正为编译进内核,找了很多高手,也没有解决这个问题。

从此就和这个问题耗上了,实在是绕不过去(在绕开以前问题的路上,经常会遇到从前的你,其实有的路,似近实远),最后从fs/Kconfig中发现端倪:

config RPCSEC_GSS_KRB5
tristate "Secure RPC: Kerberos V mechanism (EXPERIMENTAL)"
depends on SUNRPC && EXPERIMENTAL
select SUNRPC_GSS
config RPCSEC_GSS_SPKM3
tristate "Secure RPC: SPKM3 mechanism (EXPERIMENTAL)"
depends on SUNRPC && EXPERIMENTAL
select SUNRPC_GSS
也就是说,其他模块对sunrpc是有依赖的,如果某个模块被编译到内核,那么sunrpc也会被编译到内核的。由此迎刃而解。将如上两个模块编译为模块(m),sunrpc终于如愿的被编译为模块。nfs可以正常的启动。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表