# NFS not working

## methodtwo

Hi, 

In order to have my boxes talking to each other for NFS i have to put the hostnames in /etc/hosts right?.Forgive me for being a network newbie.Can anyone tell me if i'm correct and show me how to make the entries in /etc/hosts?.Thankx in advance

----------

## eccerr0r

You should be able to access other machines via NFS with dotted quad IP addresses.  If you want to use the automounter, then that may require hostnames to be set.

You'll need to run the portmapper, nfsd, mountd, (and potentially, lockd, statd) and you should be able to mount by IP address if your /etc/exports allow it.  Portmapper needs to be run on both machines even if it doesn't share nfs directories.

----------

## methodtwo

Hi there,

I'm planning on running an nfs server.Is it allright if nfsd is compiled into the kernel, as opposed to being a module that gets loaded at boot time?

----------

## pappy_mcfae

I have the nfs stuff compiled directly into my kernels, and my nfsd works just fine. And, if you plan on moving to samba any time in the future, enable cifs support while you're there.

Blessed be!

Pappy

----------

## methodtwo

Thankx dude....and thankx for your other eloquent replies to my previous post(on nfs i believe)

----------

## pappy_mcfae

You're welcome.

Blessed be!

Pappy

----------

## methodtwo

I've just installed nfs-utils on my nfs client machine and on the nfs server machine, compiled i believe the necessary stuff in the ker nel for the server and client machines,  but nfs is still not working. i get this error:

```

#mount xxx.xxx.xxx.xxx::/home/me /home/me/nfs

mount: mount to NFS server 'xxx.xxx.xxx.xxx' failed: RPC Error: program not registered.

```

I have all the necessary info in /etc/hosts and i also have the I.P address of the client along with the client daemons in /etc/hosts.allow.

Oh and i have port fowarding in my router for tcp port 2049

Please could anyone post me a method for how to check if i have all the necessary packages installed on both the client and server machines?.Any help would be great

Here are the excerts from the  .config  file for both the client and the server. The server's is

```

matt@novaexpress /usr/src/linux $ grep NFS .config

CONFIG_NFS_FS=m

CONFIG_NFS_V3=y

CONFIG_NFS_V3_ACL=y

# CONFIG_NFS_V4 is not set

CONFIG_NFS_DIRECTIO=y

CONFIG_NFSD=y

CONFIG_NFSD_V2_ACL=y

CONFIG_NFSD_V3=y

CONFIG_NFSD_V3_ACL=y

# CONFIG_NFSD_V4 is not set

CONFIG_NFSD_TCP=y

CONFIG_NFS_ACL_SUPPORT=y

CONFIG_NFS_COMMON=y

```

and the clients is:

```

softmachine linux # grep NFS .config

CONFIG_NFS_FS=m

CONFIG_NFS_V3=y

CONFIG_NFS_COMMON=y

```

Thankx for any help and replies

----------

## El_Presidente_Pufferfish

Try starting portmap on both sides

----------

## tgR10

edit your /etc/hosts.allow 

to similar like this

```
portmap: ip.ip.ip.ip/netmask

lockd: ip.ip.ip.ip/netmask

rquotad: ip.ip.ip.ip/netmask

mountd: ip.ip.ip.ip/netmask

statd: ip.ip.ip.ip/netmask
```

----------

## methodtwo

Portmap was started on both sides.....trying a re-edit of /etc/hosts.allow as suggested.Thankx for your replies guys.

----------

## methodtwo

Nope i've tried both your suggestions but have had no luck with either.

----------

## bunder

merged a bunch of nfs threads by the same user here.  what isn't here was moved to duplicate threads.

----------

## methodtwo

Hi...I'm using gentoo.Can anyone tell me how to start all the necessary nfs daemons, excluding portmap coz i have that started.I installed the nfs-utils package on the client and the server(which is supposed to have all the nfs daemons included).But when i do(on the server):

```

/etc/init.d/mountd

```

i get:

```

bash: /etc/init.d/mountd: No such file or directory

```

It's the same with nfslogd, lockd and rquotad etc. I have nfsd compiled directly into my kernel.

I don't understand.All the nfs daemons were supposed to be in nfs-utils.Any help would be great and if your telling me that i need to install the nfs daemons then please tell me how(prefferably for gentoo).Thankx in advance

----------

## questionaire

 *methodtwo wrote:*   

> Hi...I'm using gentoo.

 

never thought about that when you are posting in a gentoo forum  :Wink: 

Needed on Server-Side: nfs portmap

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

/etc/init.d/portmap start
```

Needed on Client Side: portmap

when i read your questions i really think that you should go and read some gentoo wiki docs or gentoo handbooks. maybe gentoo is not the right linux distribution if you really have no idea

----------

## methodtwo

sorry for being a n00b dude.I guess it's kinda annoying.

----------

## Hu

methodtwo:

I have not yet seen any of your posts where you provide the output of emerge --info.  This shows us quite a bit about your configuration, at least some of which is often relevant to the problem at hand.  You should always include the output of emerge --info in a new thread or link back to a post in which you provided it previously.  Similarly, if you report the name of a package that you think is relevant to a problem, please include the output of emerge --pretend --verbose category/package, so that we can see what version you are using and what flags were used to build it.

Please try to use correct spelling and grammar to the extent practical.  Allowances are often made for people whose native language is not English, but your style suggests to me that you are a native speaker.  Not all readers here are native English speakers, and if your post uses idioms, alternate spellings, or other shortcuts, it may be more difficult for some readers to follow.  That reduces the audience of potentially helpful people.

Finally, some directly relevant commentary: I think you have been reading documentation for some other Linux distribution.  Some types of documentation apply to all Linux distributions.  Other types do not.  NFS initialization happens to fall into the latter category.  Gentoo does not have /etc/init.d/mountd.  Instead, NFS services are managed through /etc/init.d/nfs, as questionaire said.

----------

## methodtwo

Hi there..i don't know if you've read my posts about my NFS problems.Basically it started working when i re-compiled my kernel so that nfsd was a module and not compiled directly into the kernel.

----------

## bunder

merged in two more threads.

----------

