# [Fixed] Can't mount NFS-shares from Linux-5.13.0

## Perfect Gentleman

I've updated kernel to 5.13.0, now netmount can't mount NFS-shares from PC with Linux-5.13.0.

```
 netmount                                                                                                                                       [ starting  ]
```

Downgrading to 5.12.13 is not a good option for me.

```
 ~ $ cat /etc/conf.d/nfs

# /etc/conf.d/nfs

# If you wish to set the port numbers for lockd,

# please see /etc/sysctl.conf

# Optional services to include in default `/etc/init.d/nfs start`

# For NFSv4 users, you'll want to add "rpc.idmapd" here.

NFS_NEEDED_SERVICES="rpc.idmapd"

# Options to pass to rpc.nfsd

OPTS_RPC_NFSD="8"

# Options to pass to rpc.mountd

# ex. OPTS_RPC_MOUNTD="-p 32767"

OPTS_RPC_MOUNTD=""

# Options to pass to rpc.statd

# ex. OPTS_RPC_STATD="-p 32765 -o 32766"

OPTS_RPC_STATD=""

# Options to pass to rpc.idmapd

OPTS_RPC_IDMAPD=""

# Options to pass to rpc.gssd

OPTS_RPC_GSSD=""

# Options to pass to rpc.svcgssd

OPTS_RPC_SVCGSSD=""

# Options to pass to rpc.rquotad (requires sys-fs/quota)

OPTS_RPC_RQUOTAD=""

# Timeout (in seconds) for exportfs

EXPORTFS_TIMEOUT=30

# Options to set in the nfsd filesystem (/proc/fs/nfsd/).

# Format is <option>=<value>.  Multiple options are allowed.

#OPTS_NFSD="nfsv4leasetime=30 max_block_size=4096"

perfect_gentleman_007@De-Humanizer ~ $ 

```

```
~ $ cat /etc/conf.d/nfsclient 

# You need to decide which nfs protocol version you want to use.

# If you are unsure, leave these alone.

#

# If you are using only nfsv4, uncomment this line:

#

rc_need="!rpc.statd"

#

# If you are using only nfsv3, uncomment this line:

#

#rc_need="!rpc.idmapd"

# 

# You will need to set the dependencies in the nfsclient script to match

# the network configuration tools you are using. This should be done in

# this file by following the examples below, and not by changing the

# service script itself.  See /etc/conf.d/netmount for more examples.

#

# This is a safe default.

rc_after="net.enp2s0"

```

```
 ~ $ sudo rc-service netmount restart

netmount          | * Mounting network filesystems ...

netmount          |mount.nfs4: mount system call failed

netmount          |mount.nfs4: mount system call failed

netmount          | * Could not mount all network filesystems
```

Last edited by Perfect Gentleman on Thu Jul 01, 2021 4:50 am; edited 1 time in total

----------

## platojones

Watching...having the exact same issue.

----------

## Perfect Gentleman

Any ideas how to fix it or where to get patch?

----------

## platojones

Not yet...still researching.

----------

## alamahant

Hi 

Your shares appear to be nfs4

You need rpc.idmapd in nfsclient also.

```

rc_need="!rpc.statd rpc.idmapd"

```

Maybe furthermore replace

```

rc_after="net.enp2s0"

```

with

```

rc_after="net"

```

Also plz post the output of 

cat /etc/idmapd.conf

Do you jave

```

CONFIG_NFS_FS=m

CONFIG_NFS_V2=m

CONFIG_NFS_V3=m

CONFIG_NFS_V3_ACL=y

CONFIG_NFS_V4=m

CONFIG_NFS_SWAP=y

CONFIG_NFS_V4_1=y

CONFIG_NFS_V4_2=y

CONFIG_PNFS_FILE_LAYOUT=m

CONFIG_PNFS_BLOCK=m

CONFIG_PNFS_FLEXFILE_LAYOUT=m

CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"

CONFIG_NFS_V4_1_MIGRATION=y

CONFIG_NFS_V4_SECURITY_LABEL=y

CONFIG_NFS_FSCACHE=y

# CONFIG_NFS_USE_LEGACY_DNS is not set

CONFIG_NFS_USE_KERNEL_DNS=y

CONFIG_NFS_DEBUG=y

# CONFIG_NFS_DISABLE_UDP_SUPPORT is not set

# CONFIG_NFS_V4_2_READ_PLUS is not set

CONFIG_NFSD=m

CONFIG_NFSD_V2_ACL=y

CONFIG_NFSD_V3=y

CONFIG_NFSD_V3_ACL=y

CONFIG_NFSD_V4=y

CONFIG_NFSD_PNFS=y

CONFIG_NFSD_BLOCKLAYOUT=y

CONFIG_NFSD_SCSILAYOUT=y

# CONFIG_NFSD_FLEXFILELAYOUT is not set

CONFIG_NFSD_V4_2_INTER_SSC=y

CONFIG_NFSD_V4_SECURITY_LABEL=y

CONFIG_NFS_ACL_SUPPORT=m

CONFIG_NFS_COMMON=y

CONFIG_NFS_V4_2_SSC_HELPER=m

```

in your .config?

What happens if you manually attempt to mount the shares?

Is

rpcbind

running?

OR

your problem is this

https://lkml.org/lkml/2021/6/29/218

----------

## Perfect Gentleman

 *Quote:*   

> What happens if you manually attempt to mount the shares?

 

Nothing is mounted.

 *Quote:*   

> Is
> 
> rpcbind
> 
> running?

 

Of course, everything works with 5.12.x kernels.

 *Quote:*   

> your problem is this
> 
> https://lkml.org/lkml/2021/6/29/218

 

I think it is this.

----------

## Perfect Gentleman

Fixed with this patch

----------

