mount static cephFS pvc via fuse inside Kubernetes pod with fsName="" #4311
Closed
Description
Hi! i need a little help. I cannot figure out how to mount cephFS static pvc with empty fsName
paramteter. I have a volume on a ceph cluster and directory i want to mount via ceph-fuse
. It works fine on linux cli but i cannot mount the dir inside a pod. It looks like it is ok to have fsName defined as an empty string.
Example
This works fine on cli:
ceph-fuse -c /etc/ceph/ceph.conf -n client.user-rnd /mnt/ceph/rnd/test -r /rnd/test
PV manifest:
apiVersion: v1
kind: PersistentVolume
metadata:
name: ceph-rnd-test-pv
spec:
accessModes:
- ReadWriteMany
capacity:
storage: 1Gi
csi:
driver: cephfs.csi.ceph.com
nodeStageSecretRef:
# node stage secret name
name: csi-cephfs-secret
# node stage secret namespace where above secret is created
namespace: default
volumeAttributes:
# Required options from storageclass parameters need to be added in volumeAttributes
clusterID: "-cluster-id-"
fsName: ""
staticVolume: "true"
rootPath: /rnd/test
mounter: fuse
# volumeHandle can be anything, need not to be same
# as PV name or volume name. keeping same for brevity
volumeHandle: ceph-rnd-test-pv
persistentVolumeReclaimPolicy: Retain
volumeMode: Filesystem
When i mount this PV inside a pod i get error:
MountVolume.MountDevice failed for volume "ceph-rnd-test-pv" : rpc error: code = Internal desc = rpc error: code = Internal desc = parameter 'fsName' cannot be empty
Environment details
ceph-csi chart version 3.8.1 (3.9.0)
kubernetes version: 1.26.6
Activity