I have a PersistentVolumeClaim as shown below
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc
spec:
accessModes:
- ReadWriteOnce
volumeMode: Block
resources:
requests:
storage: 10Gi
This PersistentVolumeClaim allows consuming storage from the PersistentVolume given below
kind: PersistentVolume
apiVersion: v1
metadata:
name: pv
spec:
volumeMode: Block
capacity:
storage: 10Gi
local:
path: /dev/sdb
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- node2.rook-ceph-2.schedock-pg0.clemson.cloudlab.us
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Delete
As evident from the spec, it bind mounts to /dev/sdb (raw block device).
No, we consume this from a Fio job pod with specification show below.
apiVersion: perf.kubestone.xridge.io/v1alpha1
kind: Fio
metadata:
name: fio-sample
spec:
builtinJobFiles:
- /jobs/rand-read.fio
- /jobs/rand-write.fio
image:
name: xridge/fio:3.13
volume:
volumeSource:
persistentVolumeClaim:
claimName: pvc
But we get this error on running this POD
lly assigned kubestone/fio-sample-22z77 to node2.rook-ceph-2.schedock-pg0.clemson.cloudlab.us
Warning FailedMount 7s (x4 over 45s) kubelet, node2.rook-ceph-2.schedock-pg0.clemson.cloudlab.us Unable to attach or mount volumes: unmounted volumes=[data], unattached volumes=[data default-token-c7pqq]: volume data has volumeMode Block, but is specified in volumeMount
I am new to kubernetes and kubestone and am not sure of what is the right way to test a block device through Fio benchmark of kubestone. Any help will be highly appreciated. Thanks a lot