kubernetes-sigs / nfs-ganesha-server-and-external-provisioner

NFS Ganesha Server and Volume Provisioner.
Apache License 2.0
427 stars 144 forks source link

mount: wrong fs type, bad option #114

Closed SpringHgui closed 1 year ago

SpringHgui commented 1 year ago

Follow the documentation step by step

kubectl get pv
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                                                             STORAGECLASS   REASON   AGE
pvc-0ebbaaaa-e1e3-4cd1-a612-d7cf472e11f2   20Gi       RWO            Delete           Bound    kubesphere-monitoring-system/prometheus-k8s-db-prometheus-k8s-0   local                   87d
pvc-0f0e1b55-8c9a-4b5b-920a-c4cb747c3eec   2Gi        RWO            Delete           Bound    default/datadir-mycluster-1                                       local                   9d
pvc-67df7b8e-c91e-481a-8995-9171175ef703   1Mi        RWX            Delete           Bound    default/nfs                                                       example-nfs             2d20h
pvc-d1996570-5932-414b-a53e-9dfe7afba3df   2Gi        RWO            Delete           Bound    default/datadir-mycluster-2                                       local                   9d
pvc-fe1a8ece-aa5c-49b5-96c5-152815177b5e   2Gi        RWO            Delete           Bound    default/datadir-mycluster-0                                       local                   9d
kubectl get pvc
NAME                  STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
datadir-mycluster-0   Bound    pvc-fe1a8ece-aa5c-49b5-96c5-152815177b5e   2Gi        RWO            local          9d
datadir-mycluster-1   Bound    pvc-0f0e1b55-8c9a-4b5b-920a-c4cb747c3eec   2Gi        RWO            local          9d
datadir-mycluster-2   Bound    pvc-d1996570-5932-414b-a53e-9dfe7afba3df   2Gi        RWO            local          9d
nfs                   Bound    pvc-67df7b8e-c91e-481a-8995-9171175ef703   1Mi        RWX            example-nfs    2d20h
# kubectl describe pod  write-pod
Name:         write-pod
Namespace:    default
Priority:     0
Node:         node8/172.16.51.12
Start Time:   Sat, 10 Dec 2022 13:46:02 +0800
Labels:       <none>
Annotations:  <none>
Status:       Pending
IP:           
IPs:          <none>
Containers:
  write-pod:
    Container ID:  
    Image:         gcr.io/google_containers/busybox:1.24
    Image ID:      
    Port:          <none>
    Host Port:     <none>
    Command:
      /bin/sh
    Args:
      -c
      touch /mnt/SUCCESS && exit 0 || exit 1
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /mnt from nfs-pvc (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-7p7wj (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes:
  nfs-pvc:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  nfs
    ReadOnly:   false
  kube-api-access-7p7wj:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              <none>
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason       Age                From               Message
  ----     ------       ----               ----               -------
  Normal   Scheduled    54s                default-scheduler  Successfully assigned default/write-pod to node8
  Warning  FailedMount  22s (x7 over 53s)  kubelet            MountVolume.SetUp failed for volume "pvc-67df7b8e-c91e-481a-8995-9171175ef703" : mount failed: exit status 32
Mounting command: mount
Mounting arguments: -t nfs -o vers=4.1 10.233.27.161:/export/pvc-67df7b8e-c91e-481a-8995-9171175ef703 /var/lib/kubelet/pods/161202a2-7525-47ed-a63b-156cbdd6befa/volumes/kubernetes.io~nfs/pvc-67df7b8e-c91e-481a-8995-9171175ef703
Output: mount: wrong fs type, bad option, bad superblock on 10.233.27.161:/export/pvc-67df7b8e-c91e-481a-8995-9171175ef703,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
SpringHgui commented 1 year ago

solved by

yum install nfs-utils

but why?

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-ci-robot commented 1 year ago

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to [this](https://github.com/kubernetes-sigs/nfs-ganesha-server-and-external-provisioner/issues/114#issuecomment-1572352485): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue with `/reopen` >- Mark this issue as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close not-planned > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
rahulaparajit-toranainc commented 1 year ago

I am facing the same issue and we have the workaround as suggested by @SpringHgui , But still I have question that why do we need to install nfs-utils explicitly?

rahulaparajit-toranainc commented 1 year ago

/reopen

k8s-ci-robot commented 1 year ago

@rahulaparajit-toranainc: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to [this](https://github.com/kubernetes-sigs/nfs-ganesha-server-and-external-provisioner/issues/114#issuecomment-1576936777): >/reopen Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
rahulaparajit-toranainc commented 1 year ago

solved by

yum install nfs-utils

but why?

@SpringHgui did you get the answer ?