LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   NFS does not work. NFSD does not start (https://www.linuxquestions.org/questions/linux-newbie-8/nfs-does-not-work-nfsd-does-not-start-681879/)

alirezan1 11-07-2008 07:39 PM

NFS does not work. NFSD does not start
 
Hi guys,

I've been trying to get NFS going on my machine but nfsd does not come up no matter what I do.

Quote:

# service nfs status
rpc.mountd (pid 4525) is running...
nfsd is stopped
# service rpcidmapd status
rpc.idmapd (pid 3810) is running...
# service portmap status
portmap (pid 1839) is running...
I have /var/lib/nfs which points to a local directory:
Quote:

# ls -la /var/lib/
total 60
drwxr-sr-x 13 root root 4096 Jan 1 00:36 .
drwxr-xr-x 21 root root 4096 May 30 2008 ..
drwxr-sr-x 2 root root 4096 May 30 2008 alternatives
drwxr-xr-x 2 root root 4096 Jan 1 00:00 dhclient
drwxr-xr-x 2 root root 4096 May 30 2008 dhcpd
drwx--S--- 2 root root 4096 Jan 1 00:02 drbd
drwxr-xr-x 2 root root 4096 May 30 2008 games
-rw-r--r-- 1 root root 474 Jan 1 2000 logrotate.status
drwxr-xr-x 2 root root 4096 Jan 1 2000 misc
lrwxrwxrwx 1 root root 9 Jan 1 00:36 nfs -> /drbd/nfs
drwxr-sr-x 2 101 104 4096 May 30 2008 ntp
-rw------- 1 root root 512 Jan 1 00:00 random-seed
drwxr-sr-x 2 root root 4096 Jan 1 00:27 rpc_pipefs
drwxr-xr-x 2 root root 4096 Jan 3 2000 rpm
drwxr-sr-x 2 root root 4096 May 30 2008 sepolgen
drwxr-sr-x 4 root root 4096 May 30 2008 stateless
and yes I am using DRBD so I've put nfs folder in the shared disk /drbd.

Here are some useful outputs of various configurations and steps and ...
Quote:

# cat /etc/idmapd.conf
[General]

Verbosity = 0
Pipefs-Directory = /var/lib/nfs/rpc_pipefs
Domain = localdomain

[Mapping]

Nobody-User = nobody
Nobody-Group = nobody

[Translation]
Method = nsswitch
Quote:

# ls -la /var/lib/nfs/
total 24
drwxr-sr-x 5 root root 4096 Jan 1 00:46 .
drwxr-xr-x 3 root root 4096 Jan 1 00:35 ..
-rw-r--r-- 1 root root 167 Jan 1 00:46 etab
-rw-r--r-- 1 root root 346 Jan 2 2000 rmtab
drwxr-xr-x 7 root root 0 Jan 1 00:37 rpc_pipefs
drwx------ 4 rpcuser rpcuser 4096 Jan 1 00:38 statd
-rw------- 1 root root 0 May 28 2008 state
drwxr-sr-x 2 root root 4096 May 28 2008 v4recovery
-rw-r--r-- 1 root root 0 May 28 2008 xtab
Quote:

# mount -a
# mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/var/lib/rpc_pipefs on /drbd/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/drbd2 on /mnt/drbd2_raid0vol2 type ext3 (rw)
Quote:

# service nfs status
rpc.mountd (pid 4525) is running...
nfsd is stopped
# service rpcidmapd status
rpc.idmapd (pid 3810) is running...
# service portmap status
portmap (pid 1839) is running...
# service nfslock status
rpc.statd (pid 3899) is running...
# service nfs restart
Shutting down NFS mountd: [ OK ]
Shutting down NFS daemon: [FAILED]
Shutting down NFS services: [ OK ]
Starting NFS services: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
# service nfs status
rpc.mountd (pid 4752) is running...
nfsd is stopped
Quote:

# rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 686 status
100024 1 tcp 689 status
100005 1 udp 688 mountd
100005 1 tcp 691 mountd
100005 2 udp 688 mountd
100005 2 tcp 691 mountd
100005 3 udp 688 mountd
100005 3 tcp 691 mountd
Quote:

# cat /etc/exports
/mnt/drbd2_raid0vol2 *(rw,sync,root_squash)
Quote:

# dmesg | tail
nfsd: last server has exited
nfsd: unexporting all filesystems
nfsd: last server has exited
nfsd: unexporting all filesystems
nfsd: last server has exited
nfsd: unexporting all filesystems
nfsd: last server has exited
nfsd: unexporting all filesystems
nfsd: last server has exited
nfsd: unexporting all filesystems
Anybody has any idea why this is happening and how I can fix this thing?

Thanks alot

fotoguy 11-11-2008 05:56 AM

NFS also uses tcpwrappers for security, some of the later versions wont start with out entries in the /etc/hosts.deny and /etc/hosts.allow files.

alirezan1 11-12-2008 07:15 PM

Thanks for the info. I have two identical machines and NFS comes up on one of them and not on the other. They seem identical to me in every way until I do:

On broken machine:
# # rpcinfo -p 155.53.176.122
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 892 status
100024 1 tcp 895 status
100005 1 udp 775 mountd
100005 1 tcp 778 mountd
100005 2 udp 775 mountd
100005 2 tcp 778 mountd
100005 3 udp 775 mountd
100005 3 tcp 778 mountd

on the good machine:

# rpcinfo -p 155.53.176.121
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100021 1 udp 34908 nlockmgr
100021 3 udp 34908 nlockmgr
100021 4 udp 34908 nlockmgr
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100021 1 tcp 51565 nlockmgr
100021 3 tcp 51565 nlockmgr
100021 4 tcp 51565 nlockmgr
100005 1 udp 970 mountd
100005 1 tcp 973 mountd
100005 2 udp 970 mountd
100005 2 tcp 973 mountd
100005 3 udp 970 mountd
100005 3 tcp 973 mountd


NFS doesn't start on the broken machine and there's no entry named nlockmgs (I have no idea what this is.).
Someone please help!!! :(


All times are GMT -5. The time now is 05:50 AM.