Unable to view mounted pvc from my pod, even though the pod is created successfully with request pvc, but the volume is created in /dev/sda2 instead of /mnt/nfs10tb/k8sdata/pod-volumes/<>

unable to view mounted pvc from my pod, even though the pod is created successfully with request pvc, but the volume is created in /dev/sda2 instead of /mnt/nfs10tb/k8sdata/pod-volumes/

Below are my pv,sc and deployment yaml config:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: jenkins-pv-cache
  namespace: rhlab-internal
spec:
  storageClassName: nfs-csi
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 50Gi


apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: nfs-csi
#Annotations:     kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"storage.k8s.io/v1","kind":"StorageClass","metadata":{"annotations":{"storageclass.kubernetes.io/is-default-class":"true"},"name":"nfs-csi"},"mountOptions":["nfsvers=4.1"],"parameters":{"readOnly":"false","server":"30.60.90.8","share":"/redis"},"provisioner":"nfs.csi.k8s.io","reclaimPolicy":"Delete","volumeBindingMode":"Immediate"}
#,storageclass.kubernetes.io/is-default-class=true
provisioner: nfs.csi.k8s.io
parameters:
  server: 192.168.1.200
  share:  /mnt/nfs10tb/k8sdata/pod-volumes/
  # csi.storage.k8s.io/provisioner-secret is only needed for providing mountOptions in DeleteVolume
  # csi.storage.k8s.io/provisioner-secret-name: "nfs-mount-options"
  # csi.storage.k8s.io/provisioner-secret-namespace: "rhlab-internal"
reclaimPolicy: Delete
volumeBindingMode: Immediate
allowVolumeExpansion: true
mountOptions:
  - hard
  - nfsvers=4.1


apiVersion: apps/v1
kind: Deployment
metadata:
  name: deployment-nginx
  labels:
    app: nginx
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:latest
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 80
        volumeMounts:
          - name: vnas-pvc
            mountPath: "/mnt/nfs"
      restartPolicy: Always
      nodeSelector:
        kubernetes.io/os: linux
        kubernetes.io/hostname: api2-qaappserver
      terminationGracePeriodSeconds: 30
      volumes:
        - name: vnas-pvc
          persistentVolumeClaim:
            claimName: jenkins-pv-cache

 k get nodes
NAME               STATUS   ROLES    AGE   VERSION
api2-qaappserver   Ready    <none>   76d   v1.32.3
qaappserver-api    Ready    <none>   69d   v1.32.3
rhlab-kubeadmn     Ready    <none>   97d   v1.32.3

cs-nfs helm release info:
csi-driver-nfs kube-system 1 2025-06-27 09:24:50.8064126 -0400 EDT deployed csi-driver-nfs-4.11.0 4.11.0

All k8s resources created correctly, pods,sc,PVC, CSI pods , CSI controller , but the pvc that is mentioned in nginx deployment is not being mounted when execute below command i can see the that mounted drive /dev/sda1 rathern than /mnt/nfs10tb/k8sdata/pod-volumes/?

when i create a same file in /mnt/nfs after login into pod , even thought I can not see the file , where are file is being created in
host drive (kubelet drive):
/var/lib/kubelet/pods/15494937-1df4-4e60-8119-1ead55c2210b/volumes/kubernetes.io~csi/pvc-64347a1d-b8d3-49ce-9794-95a5aa2a26d0/mount

Does anyone can help to find the issue,
I think this issue may have been asked many times, but was not able to find an answer for this, been on this issue for more than 2 weeks now.
thanks.

I figured out the solution for my problem, sharing here in case if this helps others:
As you can see every thin was created correctly, pod, pvc and sc,
I was missing to add persistentVolume to an persistentVolumeClaim, asfter adding Volume tag to dynamic pvc, I can view the logs and are mounter correctly in the pod.
Here is the sample pod definition:

 
apiVersion: v1
kind: Pod
metadata:
  name: alpine-test
  namespace: rhlab-internal
  labels:
       app: alpine-test
spec:
  containers:
  # This pod is used to test if the PVC is mounted correctly and writable.
  # It will create a file named SUCCESS in the mounted PVC directory.
  - name: alpine-test
    image: alpine:latest
    command: ["sleep", "infinity"]
    volumeMounts:
      - name: mnt-volume
        mountPath: /mnt/pvc
  restartPolicy: Always
  nodeSelector:
    kubernetes.io/os: linux
    kubernetes.io/hostname: api2-qaappserver
  terminationGracePeriodSeconds: 30
  volumes:
    - name: mnt-volume
      persistentVolumeClaim:
        claimName: jenkins-pv-cache
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: jenkins-pv-cache
  namespace: rhlab-internal
spec:
  storageClassName: nfs-csi
  volumeName: jenkins-pv-cache
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 50Gi
---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: jenkins-pv-cache
  namespace: rhlab-internal
  labels:
    type: nfs
spec:
  capacity:
    storage: 100Gi
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  storageClassName: nfs-csi
  mountOptions:
    - hard
    - nfsvers=4.1
  nfs:
    path: /mnt/nfs10tb/k8sdata/pod-volumes/
    server: 192.168.1.200
1 Like