# mount.nfs: No such device

## carpman

Hello, ok having few issue with new nfs share, i can't seem to mount the shares, i keep getting following error:

```

# mount -v 192.168.1.7:/home/storage /home/network_storage

mount: no type was given - I'll assume nfs because of the colon

mount: trying 192.168.1.7 prog 100003 vers 3 prot tcp port 2049

mount: trying 192.168.1.7 prog 100005 vers 3 prot udp port 54863

mount.nfs: No such device

```

I have double checked the server kernel config to make sure NFS server was built into it, which it is. 

Have checked that user UID are the same.

Connections all look good

from client

```

# rpcinfo -p

   program vers proto   port

    100000    2   tcp    111  portmapper

    100000    2   udp    111  portmapper

    100024    1   udp  44722  status

    100024    1   tcp  37116  status

```

```

rpcinfo -t 192.168.1.7 nfs

program 100003 version 2 ready and waiting

program 100003 version 3 ready and waiting

```

On server

```

rpcinfo -p

   program vers proto   port

    100000    2   tcp    111  portmapper

    100000    2   udp    111  portmapper

    100024    1   udp  44501  status

    100024    1   tcp  32912  status

    100005    1   udp  54863  mountd

    100005    1   tcp  44828  mountd

    100005    2   udp  54863  mountd

    100005    2   tcp  44828  mountd

    100005    3   udp  54863  mountd

    100005    3   tcp  44828  mountd

    100021    1   udp  39475  nlockmgr

    100021    3   udp  39475  nlockmgr

    100021    4   udp  39475  nlockmgr

    100003    2   udp   2049  nfs

    100003    3   udp   2049  nfs

    100021    1   tcp  49329  nlockmgr

    100021    3   tcp  49329  nlockmgr

    100021    4   tcp  49329  nlockmgr

    100003    2   tcp   2049  nfs

    100003    3   tcp   2049  nfs

```

any ideas?

cheers

----------

## carpman

Should add i can connect fine from laptop just not workstation?

cheers

----------

## grunch

 *carpman wrote:*   

> Should add i can connect fine from laptop just not workstation?
> 
> cheers

 

I'm encountering a similar error on attempting to NFS mount a file system. In my case, it's an NFS4 mount, but I get the same error: "mount.nfs4: No such device". I can mount the exported file system with NFS3, just not NFS4.

Strace doesn't help much, but I can attach the output if anyone is interested. Also, tcpdump/tshark running on the NFS server shows no packets received from the client, so I think this may be a kernel configuration issue. I just can't tell what should be enabled or disabled in the kernel.

lsmod:

nfs                   124528  1

lockd                  56328  2 nfs

sunrpc                157180  9 nfs,lockd

netstat -tunap:

tcp        0      0 0.0.0.0:50658           0.0.0.0:*               LISTEN     2982/rpc.statd

tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN     2966/portmap

udp        0      0 0.0.0.0:43482           0.0.0.0:*                          2982/rpc.statd

udp        0      0 0.0.0.0:614             0.0.0.0:*                          2982/rpc.statd

udp        0      0 0.0.0.0:111             0.0.0.0:*                          2966/portmap

Thanks for any help you can offer.

 David Klann

----------

## depontius

I run nfs4 at home, and at some point on each new server installation I have had to go in and manually create a directory in /var/lib/nfs - I believe it might have been /var/lib/nfs/rpc_pipefs, but I'm not sure, since it was a while ago that I last did this.  However, somewhere, either at the command line or in the logs, I got the messages pointing me in the right direction.  This was also strictly server-oriented, while trying to bring it up, and was prior to attempting any client connections.

It might also be useful for you to post the relevant parts of your kernel configs.

----------

## grunch

 *depontius wrote:*   

> I run nfs4 at home, and at some point on each new server installation I have had to go in and manually create a directory in /var/lib/nfs - I believe it might have been /var/lib/nfs/rpc_pipefs, but I'm not sure, since it was a while ago that I last did this.  However, somewhere, either at the command line or in the logs, I got the messages pointing me in the right direction.  This was also strictly server-oriented, while trying to bring it up, and was prior to attempting any client connections.
> 
> It might also be useful for you to post the relevant parts of your kernel configs.

 

Thanks, depontius, for your reply.

I checked and verified the existence of /var/lib/nfs/rpc_pipefs. In fact it seems to be required for rpc.idmapd to run (which it is). So I think that requirement is satisfied.

Another data point: I have been able to mount the desired file system with NFS4 in the past. I've made no changes to the NFS4 server. The client broke when I upgraded my kernel and configured it from scratch (i.e. .config was an empty file). Here's my current kernel NFS configuration (from /proc/config.gz):

```
CONFIG_NETWORK_FILESYSTEMS=y

CONFIG_NFS_FS=m

CONFIG_NFS_V3=y

# CONFIG_NFS_V3_ACL is not set

CONFIG_NFS_DIRECTIO=y

CONFIG_NFSD=m

CONFIG_NFSD_V3=y

# CONFIG_NFSD_V3_ACL is not set

CONFIG_NFSD_TCP=y

CONFIG_LOCKD=m

CONFIG_LOCKD_V4=y

CONFIG_EXPORTFS=m

CONFIG_NFS_COMMON=y

CONFIG_SUNRPC=m
```

And again for reference my currently loaded kernel modules:

```
nfsd                   78632  0 

exportfs                3968  1 nfsd

nfs                   124528  1 

lockd                  56328  3 nfsd,nfs

sunrpc                157180  10 nfsd,nfs,lockd
```

And finally, here's the output of netstat -tunap from the client (server is 10.1.1.10, client is 10.1.1.110, but note that nfsd is running on the client as well):

```
tcp        0      0 0.0.0.0:50658           0.0.0.0:*               LISTEN     2982/rpc.statd

tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN     2966/portmap

udp        0      0 0.0.0.0:43482           0.0.0.0:*                          2982/rpc.statd

udp        0      0 0.0.0.0:614             0.0.0.0:*                          2982/rpc.statd
```

I appreciate your help with this! I've searched off and on for several weeks without gaining any insight into the problem. I'm about to compile nfs-utils with debugging enabled to learn more about this "no such device". What device is missing anyway?!?

 -David Klann

----------

## depontius

By way of comparison, I have:

```
CONFIG_NFS_FS=m

CONFIG_NFS_V3=y

CONFIG_NFS_V3_ACL=y

CONFIG_NFS_V4=y

CONFIG_NFS_DIRECTIO=y

CONFIG_NFSD=m

CONFIG_NFSD_V2_ACL=y

CONFIG_NFSD_V3=y

CONFIG_NFSD_V3_ACL=y

CONFIG_NFSD_V4=y

CONFIG_NFSD_TCP=y

CONFIG_NFS_ACL_SUPPORT=m

CONFIG_LOCKD=m

CONFIG_LOCKD_V4=y

CONFIG_EXPORTFS=m

CONFIG_NFS_COMMON=y

CONFIG_SUNRPC=m

CONFIG_SUNRPC_GSS=m

CONFIG_SUNRPC_BIND34=y
```

I'm not actually using GSSAPI or Kerberos, but my kernels are ready whenever I get the time to play with the userspace.

As for kernel modules:

```
nfsd                  210920  17 

exportfs                4927  1 nfsd

auth_rpcgss            39092  1 nfsd

nfs                   238007  0 

nfs_acl                 3422  2 nfsd,nfs

lockd                  61232  3 nfsd,nfs

sunrpc                157157  10 nfsd,auth_rpcgss,nfs,nfs_acl,lockd
```

And the relevant lines from "netstat -tupan":

```
tcp        0      0 0.0.0.0:39115           0.0.0.0:*               LISTEN      7266/rpc.statd      

tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      7191/portmap        

tcp        0      0 0.0.0.0:43835           0.0.0.0:*               LISTEN      7394/rpc.mountd     

udp        0      0 0.0.0.0:32770           0.0.0.0:*                           7266/rpc.statd      

udp        0      0 0.0.0.0:32771           0.0.0.0:*                           7394/rpc.mountd   

udp        0      0 0.0.0.0:658             0.0.0.0:*                           7266/rpc.statd   

udp        0      0 0.0.0.0:111             0.0.0.0:*                           7191/portmap   

```

I notice that I have "rpc.mountd" running and listening, but then again, getting that to run sounds like part of your problem.

----------

## grunch

 *depontius wrote:*   

> By way of comparison, I have:
> 
> ```
> CONFIG_NFS_FS=m
> 
> ...

 

Well, the one that clued me in was the last line above. The option wasn't even in my .config! What's going on? After a bit more hunting around, I realized I had never enabled CONFIG_EXPERIMENTAL. After I did I was able to see CONFIG_NFS_V4, and enabled that as well. It's all working now!

Thanks again, depontius! I very much appreciate your time and replies!

carpman, make sure CONFIG_EXPERIMENTAL is enabled in your kernel config, then visit

```
File systems  --->

  Network File Systems  --->

```

to ensure all the proper settings are enabled.

Hope this helps!

 -David

----------

