Home > OS >  amazon-efs failed, reason given by server: No such file or directory
amazon-efs failed, reason given by server: No such file or directory

Time:09-24

apiVersion: v1
kind: PersistentVolume
metadata:
    name: ****-pv-public
    namespace: ****
spec:
    storageClassName: efs-sc
    capacity:
        storage: 3Gi
    accessModes:
        - ReadWriteMany
    persistentVolumeReclaimPolicy: Retain
    csi:
        driver: efs.csi.aws.com
        volumeHandle: fs-***
        volumeAttributes:
            path: /***/public

Mounting arguments: -t efs -o tls fs-2f974c54://public /var/lib/kubelet/pods/9784d80e-4678-4b0b-96ae-a5cccf7db7a0/volumes/kubernetes.io~csi/**/mount Output: Could not start amazon-efs-mount-watchdog, unrecognized init system "aws-efs-csi-dri" b'mount.nfs4: mounting 127.0.0.1:/****/public failed, reason given by server: No such file or directory'

Edit

I fix it -- create an access point

apiVersion: v1
kind: PersistentVolume
metadata:
    name: **-pv-public
    namespace: laravel-test
spec:
    storageClassName: efs-sc
    capacity:
        storage: 3Gi
    accessModes:
        - ReadWriteMany
    persistentVolumeReclaimPolicy: Retain
    csi:
        driver: efs.csi.aws.com
        volumeHandle: fs-**::fsap-***

and fs-::fsap-* (::) not (:)

CodePudding user response:

Are you trying to access a sub directory of EFS named "public"?

csi:
  driver: efs.csi.aws.com
  volumeHandle: fs-***:/public

CodePudding user response:

does the sub directory exists which you're mounting? also can you try adding like this? As per the example the path should exists.

Replace FileSystemId of the EFS filesystem ID that needs to be mounted. And replace Path with a existing path on the filesystem.

you can refer this link:

https://github.com/kubernetes-sigs/aws-efs-csi-driver/tree/master/examples/kubernetes/volume_path

apiVersion: v1
kind: PersistentVolume
metadata:
  name: efs-****-pv
spec:
  capacity:
    storage: 15Gi
  volumeMode: Filesystem
  mountOptions:
    - tls
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  storageClassName: efs-sc
  csi:
    driver: efs.csi.aws.com
    volumeHandle: fs-*****:/****
  • Related