# nfs daemon errors

## jimbob77

Can anyone help?

I'm trying to share directories between my laptop and desktop. I set up the desktop as an nfs server according the the howto: http://gentoo-wiki.com/HOWTO_Share_Directories_via_NFS

Problem is, nfs daemon won't start:

```

# /etc/init.d/portmap start

* Starting portmap ...                                                     [ ok ]

* Reloading portmap table ...                                              [ ok ]

* Starting NFS statd ...                                                   [ ok ]

* Exporting NFS directories ...

192.168.1.4:/mnt/shared: Function not implemented                           [ ok ]

* Starting NFS daemon ...

* Error starting NFS daemon                                                [ !! ]

* Starting NFS mountd ...                                                  [ ok ]

```

My /etc/exports file (192.168.1.4 is the address of the client laptop):

```

# /etc/exports: NFS file systems being exported.  See exports(5

/mnt/shared 192.168.1.4(rw,sync)

```

Looked through piles of posts on the forums, but mostly seem to be problems of not loading modules/having the wrong built in kernel options. I think my kernel is compiled with the right options though:

```

/usr/src/linux# cat .config | grep NFS

CONFIG_NFS_FS=y

CONFIG_NFS_V3=y

# CONFIG_NFS_V4 is not set

# CONFIG_NFS_DIRECTIO is not set

CONFIG_NFSD=y

CONFIG_NFSD_V3=y

# CONFIG_NFSD_V4 is not set

CONFIG_NFSD_TCP=y

```

Never used NFS before -- can anyone spot my problem?

----------

## m4chine

my /etc/exports file looks like:

/share 192.168.100.0/255.255.255.0(async,no_subtree_check,rw)

which will give all users with ips in 192.168.100.1-192.168.100.254 access to the share. Try changing sync to async, I didn't find sync as a valid option in the current man pages. The option async is used for improved performance, and no_subtree_check is used for increased reliability, and rw is for read/write to the share.

If its not the sync option, I think we will need more information to solve this, try:

Open a terminal, su to root, and do

```
tail -f /var/log/messages
```

Then on another terminal try and start the nfs daemon 

```
/etc/init.d/nfs start
```

and then post the output from the tail on messages. That hopefully will give us some more insight to the problem.

----------

## jimbob77

Ok, I tried changing sync to async, but got exactly the same errors when restarting the nfs daemon:

```

#/etc/init.d/nfs restart

[nfs daemon errors as above]

```

Looking at the log:

```

# tail -f /var/log/messages

Oct 27 19:21:41 eileen rpc.mountd: Caught signal 15, un-registering and exiting.

Oct 27 19:21:41 eileen rpc.statd[6752]: Caught signal 15, un-registering and exiting.

Oct 27 19:21:41 eileen rpc.statd[7170]: Version 1.0.6 Starting

Oct 27 19:21:41 eileen rpc.statd[7170]: gethostbyname error for eileen       #eileen is the hostname of the desktop (server)

Oct 27 19:21:41 eileen nfsd[7175]: nfssvc: Function not implemented

Oct 27 19:21:41 eileen rc-scripts: Error starting NFS daemon

```

Also, I heard a rumour that you can't share vfat file systems through nfs -- can you confirm this? I don't think this is the problem here though -- /mnt/shared is vfat, but when I tried the same thing with an ext3 file system directory the same errors appeared.

----------

## augury

looks like mm-sources bug.  try vanilla-sources or <2.6.12?.

----------

## m4chine

jimbob77,

what kernel/version are you using?

----------

## jimbob77

Both server and client are using kernel 2.6.12.5, both vanilla. Is this an mm-source? (Too much of a noob to know!)

----------

## m4chine

 *jimbob77 wrote:*   

> Both server and client are using kernel 2.6.12.5, both vanilla. Is this an mm-source? (Too much of a noob to know!)

 

Nope, you are using vanilla-sources, augury was referencing mm-sources, a cutting edge kernel patch set that one of the developers put out.

Do you have your hostname/dnsdomainname setup up properly in /etc/conf.d/hostname & /etc/conf.d/domainname and if so are they started and in your runlevels? 

```
rc-status
```

 Will tell you if they are in any runlevels and if they are started; it sounds like you have a hostname problem.

----------

## jimbob77

Have no idea why this worked, but tried recompiling kernel with nfs support as modules instead of built in -- abracadabra problem solved. Still no closer to understanding why/what went wrong though...

Anyway thanks for your help m4chine.

----------

## m4chine

Thats actually not an uncommon fix for issues that I've experienced either. Sometimes by building a feature as a module fixes the problem, glad to hear it fixed yours too.

cheers

----------

## WerK

Its quite simple ... the modules need to be loaded ... so you can add them to /etc/modules-autoload.d/kernel-2.6 and it'll work

----------

