# \[e2e test\] No permission to execute 'blockdev --getss /mnt/volume1'

**URL:** <https://discuss.kubernetes.io/t/e2e-test-no-permission-to-execute-blockdev-getss-mnt-volume1/23508>\
**Category:** General Discussions\
**Created:** [March 17, 2023, 7:51am UTC](https://discuss.kubernetes.io/t/e2e-test-no-permission-to-execute-blockdev-getss-mnt-volume1/23508 "2023-03-17T07:51:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![QsanJohnson](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/qsanjohnson/32/12052_2.png) [@QsanJohnson](https://discuss.kubernetes.io/u/QsanJohnson)\
**Post date:** [March 17, 2023, 7:51am UTC](https://discuss.kubernetes.io/t/e2e-test-no-permission-to-execute-blockdev-getss-mnt-volume1/23508/1 "2023-03-17T07:51:34Z")

</div>

For PersistentVolumeBlock, the value of volumeDevices.devicePath in Pod yaml can be “/dev/volume1”. But if I change to “/mnt/volume1”, it will get permission error as below when I execute blockdev command in the Pod.  
/ # blockdev --getss /mnt/volume1  
blockdev: can’t open ‘/mnt/volume1’: Permission denied

For e2e test in multhvolume.go, it always pass “/mnt/volume1” path in storageutils.GetSectorSize().  
Is it correct ? should we change it to “/dev/volume1” for PersistentVolumeBlock.

### Cluster information:

Kubernetes version: 1.26  
Cloud being used: (put bare-metal if not on a public cloud)  
Installation method:  
Host OS: Ubuntu 22.04.1 LTS  
CNI and version: Weave  
CRI and version: crio version 1.23.4

---

<div class="post-metadata">

**Author:** ![QsanJohnson](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/qsanjohnson/32/12052_2.png) [@QsanJohnson](https://discuss.kubernetes.io/u/QsanJohnson)\
**Post date:** [March 20, 2023, 1:14am UTC](https://discuss.kubernetes.io/t/e2e-test-no-permission-to-execute-blockdev-getss-mnt-volume1/23508/2 "2023-03-20T01:14:44Z")

</div>

I try it on csi-driver-host-path CSI driver, it still not support volumeDevices.devicePath in Pod yaml is “/mnt/volume1”.  
The below is my yaml content of test file,  
apiVersion: v1  
kind: PersistentVolumeClaim  
metadata:  
name: csi-pvc-block  
spec:  
volumeMode: Block  
accessModes:  
- ReadWriteOnce  
resources:  
requests:  
storage: 5Gi  
storageClassName: csi-storage

kind: Pod  
apiVersion: v1  
metadata:  
name: test-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: csi-pvc-block

The conclusion is it seems the value of volumeDevices.devicePath in Pod yaml should be /dev/volume1.
