Skip to content

Instantly share code, notes, and snippets.

@mffiedler
Last active September 18, 2019 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mffiedler/21e751f99945646998a3e42092af4da8 to your computer and use it in GitHub Desktop.
Save mffiedler/21e751f99945646998a3e42092af4da8 to your computer and use it in GitHub Desktop.
1. Remove existing project with the PV if necessary
2. cd svt/openshift_scalability/content/quickstarts
3. oc process -f rails-postgresql-pv.json -p VOLUME_CAPACITY=1000Gi | oc create -f -
(you can change the PV size but it should not matter - the actual data on disk is what should matter)
4. wait a few minutes until the postgresql pod is running
5. oc rsh <pod_name>
6. mkdir -p /var/lib/pgsql/data/xtra
7. for i in {1..110}; do echo $i; dd if=/dev/zero of=/var/lib/pgsql/data/xtra/file_$i.txt count=1048576 bs=8192; done
8. du -sh /var/lib/pgsql/data/xtra/ to show total amount used.
That creates 110 x 8.8GB files. Change the 110 to something smaller for less. It takes a while.
If you want to reuse the existing project/PV/PVC, just do an rm -rf /var/lib/pgsql/data/xtra/ after oc rsh'ing into the pod
and start at step 6.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment