Starting with DigitalOcean and a clean install of RKE2.
Once Longhorn and Portworx Enterprise is deployed this are the two PVC and PODs to test with FIO.
# longhorn
kubectl apply -f - << EOF
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: fio-test-pvc
spec:
accessModes:
- ReadWriteOnce
storageClassName: longhorn # <-- change per CSI driver under test
resources:
requests:
storage: 2Gi
EOF
kubectl apply -f - << EOF
apiVersion: v1
kind: Pod
metadata:
name: fio-test
labels:
app: fio-test
spec:
restartPolicy: Never
containers:
- name: fio
image: registry.hub.docker.com/xridge/fio:latest # or any image with fio installed
command: ["sleep", "1000000000"]
volumeMounts:
- name: test-vol
mountPath: /data
resources:
requests:
cpu: "1"
memory: 512Mi
volumes:
- name: test-vol
persistentVolumeClaim:
claimName: fio-test-pvc
EOF
# pxe
kubectl apply -f - << EOF
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: fio-test-pvc2
spec:
accessModes:
- ReadWriteOnce
storageClassName: px-csi-db
resources:
requests:
storage: 2Gi
EOF
kubectl apply -f - << EOF
apiVersion: v1
kind: Pod
metadata:
name: fio-test2
labels:
app: fio-test2
spec:
restartPolicy: Never
containers:
- name: fio
image: registry.hub.docker.com/xridge/fio:latest # or any image with fio installed
command: ["sleep", "1000000000"]
volumeMounts:
- name: test-vol2
mountPath: /data
resources:
requests:
cpu: "1"
memory: 512Mi
volumes:
- name: test-vol2
persistentVolumeClaim:
claimName: fio-test-pvc2
EOF# exec into the pod
kubectl exec -it fio-test -- sh
#run FIO
fio --name=seqwrite --directory=/data --rw=write --bs=1M --size=1G --numjobs=1 --iodepth=16 --ioengine=libaio --direct=1 --runtime=60 --time_based --group_reporting# exec into the pod
kubectl exec -it fio-test2 -- sh
#run FIO
fio --name=seqwrite --directory=/data --rw=write --bs=1M --size=1G --numjobs=1 --iodepth=16 --ioengine=libaio --direct=1 --runtime=60 --time_based --group_reporting