Version (k3OS / kernel)
Architecture
KVM
Describe the bug
NFS cannot run due to statd cannot start
To Reproduce
config.yaml
modules:
- nfs
Expected behavior
Run successfully
Actual behavior
Cannot run nfs service properly
Additional context
-o nolock without depending on statd will run properlyThe -o nolock sounds like a risky work-around.
NFS cannot run due to statd cannot start
This seems to assume that the rpc.statd service is started automatically which is not the case. Please see https://github.com/rancher/k3os/issues/555#issuecomment-675736724 for a snippet of what your config.yaml will need, specifically:
boot_cmd:
- rc-update add rpc.statd
- rc-update add nfs
Thank you for reply,
I've tried the method said on #555 before, but invalid.
I tried again after your advice. But it seems not works, either.

seems that it cannot be started at boot_cmd

I manually ran the script after login rc-update add rpc.statd, and it said

Then when I ran again, it said

Looks it could run successfully after login?
Is it not a proper point that run this rc-update add rpc.statd at boot ?
Hi,
I have the same issue. I think the problem is rpc.statd service fails to start due to a missing directory. Please see the logs below.
Feb 11 08:15:49 host1 daemon.notice rpc.statd[6585]: Version 2.4.3 starting
Feb 11 08:15:49 host1daemon.notice sm-notify[6586]: Version 2.4.3 starting
Feb 11 08:15:49 host1 daemon.notice sm-notify[6586]: Already notifying clients; Exiting!
Feb 11 08:15:49 host1 daemon.err rpc.statd[6585]: Failed to open directory sm: No such file or directory
Feb 11 08:15:49 host1 daemon.err rpc.statd[6585]: Failed to stat /var/lib/nfs/sm: No such file or directory
Feb 11 08:15:49 host1 daemon.err /etc/init.d/rpc.statd[6583]: start-stop-daemon: failed to start `/sbin/rpc.statd'
Feb 11 08:15:49 host1 daemon.err /etc/init.d/rpc.statd[6562]: ERROR: rpc.statd failed to start
As a workaround, I have created this directory /var/lib/nfs/sm and I could mount NFS without any more issues.
Maybe it is a good idea to add creating directory /var/lib/nfs/sm rpc.statd init script.
Regards
Hi!
I've the same problem. Please add default support for it at deployment.
Best Regards
I am running the same version with following config.yaml and everything works just fine:
ssh_authorized_keys:
- ssh-rsa <REDACTED>
hostname: kloudpi-1
boot_cmd:
- rc-update add rpc.statd
- rc-update add nfs
- mkdir /nfs # <-- Make sure to create a mount point
run_cmd:
- mount /nfs # <-- Not needed after config of /etc/fstab
write_files:
- content: |
#!/bin/bash
sudo mount -o remount,rw /k3os/system
sudo vi /k3os/system/config.yaml
encoding: ""
owner: rancher
path: /home/rancher/edit-config
permissions: "0755"
- content: |
192.168.1.26:/volume1/K8S /nfs nfs nolock,rw 0 0
encoding: ""
owner: root
path: /etc/fstab
permissions: "0644"
k3os:
password: <REDACTED>
modules:
- nfs # <-- Required module
ntp_servers:
- 0.asia.pool.ntp.org
- 1.asia.pool.ntp.org
- 2.asia.pool.ntp.org
- 3.asia.pool.ntp.org
dns_nameservers:
- 192.168.1.1
- 8.8.8.8
- 8.8.4.4
k3s_args:
- server
- --cluster-init
- --disable=traefik,local-storage
token: <REDACTED>
taints:
- CriticalAddonsOnly=true:NoExecute
Most helpful comment
Hi,
I have the same issue. I think the problem is rpc.statd service fails to start due to a missing directory. Please see the logs below.
As a workaround, I have created this directory
/var/lib/nfs/smand I could mount NFS without any more issues.Maybe it is a good idea to add creating directory
/var/lib/nfs/smrpc.statd init script.Regards