# [solved] Mounting NFS share (rpc-statd.service fails)

## friesia

I'm trying to mount an NFS 4 share described in fstab as:

```
drozd.aster:/        /mnt/remote-drozd   nfs4       noauto,user                    0 0
```

Mount command:

```
# mount /mnt/remote-drozd

Job for rpc-statd.service failed because the control process exited with error code. See "systemctl status rpc-statd.service" and "journalctl -xe" for details.

mount.nfs4: rpc.statd is not running but is required for remote locking.

mount.nfs4: Either use '-o nolock' to keep locks local, or start statd.

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

rpc-statd status:

```
# systemctl status -l rpc-statd.service

● rpc-statd.service - NFS status monitor for NFSv2/3 locking.

   Loaded: loaded (/usr/lib64/systemd/system/rpc-statd.service; static; vendor preset: enabled)

   Active: failed (Result: exit-code) since 水 2015-09-02 10:34:23 MSK; 26s ago

  Process: 1183 ExecStart=/sbin/rpc.statd --no-notify $STATDARGS (code=exited, status=1/FAILURE)

 9月 02 10:34:23 melforce systemd[1]: Starting NFS status monitor for NFSv2/3 locking....

 9月 02 10:34:23 melforce rpc.statd[1184]: Version 1.3.2 starting

 9月 02 10:34:23 melforce rpc.statd[1184]: Flags: TI-RPC

 9月 02 10:34:23 melforce rpc.statd[1184]: Running as root.  chown /var/lib/nfs to choose different user

 9月 02 10:34:23 melforce rpc.statd[1184]: failed to create RPC listeners, exiting

 9月 02 10:34:23 melforce systemd[1]: rpc-statd.service: Control process exited, code=exited status=1

 9月 02 10:34:23 melforce systemd[1]: Failed to start NFS status monitor for NFSv2/3 locking..

 9月 02 10:34:23 melforce systemd[1]: rpc-statd.service: Unit entered failed state.

 9月 02 10:34:23 melforce systemd[1]: rpc-statd.service: Failed with result 'exit-code'.
```

Please tell me what's wrong.

I noticed rpc-statd is for NFS 2 and 3, not for NFS 4.Last edited by friesia on Wed Sep 02, 2015 3:12 pm; edited 1 time in total

----------

## ian.au

I can't really tell what is wrong from your post, but to maybe point you in the direction of the problem; you need the following running on the client:

```
systemctl status rpcbind.service
```

```
systemctl status remote-fs.target
```

so you could try enabling and starting either and/or both of those if they are not running. 

Assuming that gets you mounted: In your fstab line, you probably want to add rw to your options  *Quote:*   

> drozd.aster:/        /mnt/remote-drozd   nfs4        rw,noauto,user                    0 0

  or you won't have any useful permissions on the user mount.

----------

## friesia

Thanks, I could mount it after starting rpcbind.service (why is it not started as a dependency?).

It wasn't necessary to add "rw", it's the default.

----------

## ian.au

Glad you got it running. Quite right about the default rw setting too, brain-fade there on my part. I fast-checked fstab on one of the machines here I set up to connect to a few different exports and I'd specified rw, ro on each individual mount; guess I did that to remind me how they're exported, I can't really remember now. 

I do recall moving to systemd caused me massive ass-pain when migrating my nfs setup - and really poorly documented. Anyway, mark this one [solved] if you're good, might help someone else with the same issue. I won't bother to edit my original reply, leaving rw in the options won't hurt, even if it is redundant.   :Embarassed: 

----------

