Skip to content

Instantly share code, notes, and snippets.

@alanbchristie
Created May 3, 2019 14:20
Show Gist options
  • Save alanbchristie/ef98c79d50512d742d2ac14b9c2342a1 to your computer and use it in GitHub Desktop.
Save alanbchristie/ef98c79d50512d742d2ac14b9c2342a1 to your computer and use it in GitHub Desktop.
List OKD PV volumes (paths)
#!/bin/bash
#
# Use the oc-command-set to get persistent volume paths.
# Useful in correlating PV to underlying gluster volume.
#
# Alan Christie
# May 2019
for pvc in $(oc get pv | grep pvc- | cut -f1 -d" ")
do
oc describe pv/$pvc | grep "Path:" | tr -s ' ' | cut -f3 -d" "
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment