Block volume devicePath should be under /dev directory

If the volumeMode of PersistentVolumeClaim is Block, the devicePath of volumeDevices of Pod should be /dev/xxxx, for example /dev/volume1.
The interesting thing is if I change the devicePath of volumeDevices of Pod to /mnt/volume1, it will be permission denied to access it.

Cluster information:

Kubernetes version: 1.25
Cloud being used: (put bare-metal if not on a public cloud)
Installation method:
Host OS: Debian / Ubuntu
CNI and version:
CRI and version:


apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: iscsi-pvc
spec:
volumeMode: Block
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
storageClassName: “”
volumeName: iscsi-pv

kind: Pod
apiVersion: v1
metadata:
name: iscsi-pod-block
spec:
containers:

  • image: busybox
    command: [“/bin/sh”, “-c”]
    args: [ “tail -f /dev/null” ]
    name: test-container
    securityContext:
    privileged: true
    capabilities:
    add: [“SYS_ADMIN”]
    volumeDevices:
    • name: vol
      devicePath: /mnt/volume1
      volumes:
    • name: vol
      persistentVolumeClaim:
      claimName: iscsi-pvc