Last active
March 19, 2018 01:54
-
-
Save rafabene/2889150740201851c4af95ed46b22ed1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ for A in {01..50}; do mkdir -p /data/pv$A; chmod 777 /data/pv$A; chcon -Rt svirt_sandbox_file_t /data/pv$A; done | |
$ for A in {01..50}; do | |
cat <<EOF>> pv.yaml | |
apiVersion: "v1" | |
kind: "PersistentVolume" | |
metadata: | |
name: "pv$A" | |
spec: | |
capacity: | |
storage: 1Gi | |
accessModes: | |
- ReadWriteOnce | |
persistentVolumeReclaimPolicy: Recycle | |
hostPath: | |
path: /data/pv$A | |
EOF | |
oc create -f pv.yaml; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment