# NFSv4 client config

## ultimateclem

Hi, i need some help. I'm pretty sure i'm getting a config problem on my desktop, running gentoo ~amd64. My NFS server is working well, because i can mount the NFS4 volume on my ubuntu laptop, but not on my gentoo desktop. Problem seems to be on idmapd that can't start. I try to find why, but never succeed and i now i'm stucked with this config.

here are some output that can help

```
PATATOR portage # /etc/init.d/rpc.idmapd restart

 * Starting idmapd

 * make sure DNOTIFY support is enabled

 * ERROR: rpc.idmapd failed to start
```

I'm sure i compiled kernel with DNOTIFY support (2 times).

```
/etc/init.d/rpc.pipefs restart

 * Unmounting RPC pipefs

 * Setting up RPC pipefs
```

```
PATATOR portage # rpcinfo -p

   program vers proto   port  service

    100000    4   tcp    111  portmapper

    100000    3   tcp    111  portmapper

    100000    2   tcp    111  portmapper

    100000    4   udp    111  portmapper

    100000    3   udp    111  portmapper

    100000    2   udp    111  portmapper

    100024    1   udp  50531  status

    100024    1   tcp  38354  status
```

Any idea of what i missed ? Thanks

----------

## sitquietly

 *ultimateclem wrote:*   

> .....Problem seems to be on idmapd that can't start.....
> 
> Any idea of what i missed ? Thanks

 

The Gentoo Wiki article on NFSv4??

It appears from there that you need the nfsidmap use flags set before you emerge nfs-utils, and you need root to execute

```

rc-update add nfs default 

```

to start nfs client services on your next reboot.  

Have you done those two things?

I use a nfsv4 server with funtoo linux clients and setup was dead simple.  I hope it proves to be simple for you too.  Please check the wiki page and post again if it doesn't help...

----------

## ultimateclem

Thank you for your answer sitquietly. Some new informations :

 *Quote:*   

> The Gentoo Wiki article on NFSv4??

 

I red and apply this page (and some others) several times, but nothing seems to be simple on my computer...

 *Quote:*   

> It appears from there that you need the nfsidmap use flags set before you emerge nfs-utils, and you need root to execute

 

already done : 

```
PATATOR share # equery uses nfs-utils

[ Legend : U - final flag setting for installation]

[        : I - package is installed with flag     ]

[ Colors : set, unset                             ]

 * Found these USE flags for net-fs/nfs-utils-1.3.2-r6:

 U I

 - - caps     : Use Linux capabilities library to control privilege

 + + ipv6     : Add support for IP version 6

 - - kerberos : Add kerberos support

 + + libmount : Link mount.nfs with libmount

 - - nfsdcld  : Enable nfsdcld NFSv4 clientid tracking daemon

 + + nfsidmap : Enable support for newer nfsidmap helper

 + + nfsv4    : Enable support for NFSv4

 + + nfsv41   : Enable support for NFSv4.1

 - - tcpd     : Add support for TCP wrappers

 + + uuid     : Support UUID lookups in rpc.mountd
```

 *Quote:*   

> 
> 
> ```
> 
> rc-update add nfs default 
> ...

 

Already done with the help of the wiki page

Some news, i succeed in starting nfs service when i inactivate the option #NFS_NEEDED_SERVICES="rpc.idmapd" in /etc/conf.d/nfs. I'm not sure i need idmap, because i'm on a small home network, all users and passwords are the same on all computers. But nfs refuses to mount the remote volume, as it says : 

```
PATATOR share # mount -t nfs4 serveur:/media/raid /NAS

mount.nfs4: an incorrect mount option was specified
```

Any other idea ? Do you think it is possible my kernel has not the good options ?

----------

## krinn

my car doesn't work because its tires are flat...

so i remove the tires... but still the car doesn't work, what could be wrong?

 :Very Happy: 

Don't mess with it, fix idmapd, if it complain about DNOTIFY it is certainly because you don't have DNOTIFY, yeah you did compile that kernel with DNOTIFY xtimes already, but did you properly install it?

----------

## sitquietly

 *ultimateclem wrote:*   

> Thank you for your answer sitquietly. Some new informations :
> 
> - - caps     : Use Linux capabilities library to control privilege
> 
>  - - tcpd     : Add support for TCP wrappers
> ...

 

First, I enjoyed the photographic slideshow on your website.  Very nice.  Second, I am not very knowledgeable about nfs problems but just happen to be using nfs4 from my Funtoo server to my Funtoo client computers (and a zfs root and zfs mirrored pool for /home on my workstation -- and share zfs home datasets via nfs...)

For some reason I have "caps" and "tcpd" use flags set for my nfs-utils.  

What happens with 

```
mount -t nfs serveur:/media/raid /NAS
```

.  Does it allow nfs mounting if you don't specify v4?

(Krinn may have given you the answer you need).

----------

## ultimateclem

First, thank you all for trying to help me, i really appreciate. I'm not a linux beginner (user since... maybe 15 years! ), but i'm a newbie in nfs. So, please understand that i'm not aware of what idmap is use for (but i understand that a car can run without tires and with a lot of noise and some drifting problem on the road  :Smile:  )

Thank you sitquietly    :Wink: 

here are my results of your question.

```
PATATOR share # zcat /proc/config.gz | grep "DNOTIFY"

CONFIG_DNOTIFY=y
```

```
PATATOR share # mount -t nfs -v serveur:/media/raid /NAS

mount.nfs: timeout set for Mon Mar 30 18:24:41 2015

mount.nfs: trying text-based options 'vers=4.2,addr=192.168.1.64,clientaddr=192.168.1.89'

mount.nfs: mount(2): Invalid argument

mount.nfs: an incorrect mount option was specified
```

```
PATATOR share # mount -t nfs4 -v serveur:/media/raid /NAS

mount.nfs4: timeout set for Mon Mar 30 18:25:53 2015

mount.nfs4: trying text-based options 'vers=4.2,addr=192.168.1.64,clientaddr=192.168.1.89'

mount.nfs4: mount(2): Invalid argument

mount.nfs4: an incorrect mount option was specified
```

i'm emerging right now so i can't try with USE tcpd and caps...

----------

## ultimateclem

YES ! [SOLVED] !   :Razz: 

or i should say half-solved because idmapd is still NOT working...

adding vers=4.0 on fstab line to force NFS4.0 version at mounting time. I don't know why 4.1 doesn't work (server side probably and don't care for now) and why 4.2 is the default version for protocol (see mount -t -v in previous post)

So, question is "should i really need idmap ?" and if yes, "how to make idmapd starting ?"

----------

