#!/bin/bash test_scratch_device=/dev/xvdc if [ $# -ge 1 ] ; then test_scratch_device=$1 fi if [ ! -b "${test_scratch_device}" ] ; then echo "invalid scratch device name: ${test_scratch_device}" >&2 exit 1 fi lsblk random_string=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 8) sudo mkdir -p /var/lib/rook/${random_string}/mon1 /var/lib/rook/${random_string}/mon2 /var/lib/rook/${random_string}/mon3 node_name=$(kubectl get nodes -o jsonpath={.items[*].metadata.name}) kubectl label nodes ${node_name} rook.io/has-disk=true kubectl delete pv -l type=local cat <