K3os: NFS cannot run successfully due to `statd` cannot start on k3os-amd64-v0.19.5-rc.1

Created on 6 Feb 2021  路  5Comments  路  Source: rancher/k3os

Version (k3OS / kernel)

  • k3os-amd64-v0.11.1
  • k3os-amd64-v0.19.5-rc.1

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

  • Mount using option -o nolock without depending on statd will run properly
kinbug

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.

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

All 5 comments

The -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.

image


seems that it cannot be started at boot_cmd

image


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

Then when I ran again, it said
image

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
Was this page helpful?
0 / 5 - 0 ratings

Related issues

stenwt picture stenwt  路  3Comments

Moep90 picture Moep90  路  5Comments

svefors picture svefors  路  8Comments

larssb picture larssb  路  7Comments

fcioffi picture fcioffi  路  8Comments