Topics covered in this article:
This can be checked by 2 methods.
-
Using mayactl
-
Using curl command
Using mayactl
-
Get the PV name for the Jiva volume PVC using the following:
kubectl get pvc <namespace-of-pvc>
Example command:
kubectl get pvc -n default
Example output:
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE jiva-vol1-1r-claim Bound pvc-23b6b763-c010-11e9-ad45-42010a8001c8 4G RWO jiva-1r 25m
-
Exec into maya-apiserver pod using the following command:
kubectl exec -it <maya-apiserver-podname> -n <openebs_installed_namespace> bash
Example command:
kubectl exec -it maya-apiserver-6797f79566-4bq2d -n openebs bash
-
Run the
mayactl
command to get the status of the Jiva volume:mayactl volume describe --volname <pv-name> -n <namespace-of-pvc>
Example command:
bash-4.3# mayactl volume describe --volname pvc-23b6b763-c010-11e9-ad45-42010a8001c8 -n default
Example output:
Portal Details : ---------------- IQN : iqn.2016-09.com.openebs.jiva:pvc-23b6b763-c010-11e9-ad45-42010a8001c8 Volume : pvc-23b6b763-c010-11e9-ad45-42010a8001c8 Portal : 10.31.242.97:3260 Size : 4G Controller Status : running,running Controller Node : gke-sai-bdd-test-pool-1-6b35426e-8gfj Replica Count : 3 Replica Details : ----------------- NAME ACCESSMODE STATUS IP NODE ----- ----------- ------- --- ----- pvc-23b6b763-c010-11e9-ad45-42010a8001c8-rep-7d49c9f499-blrlv RW running 10.28.28.11 gke-sai-bdd-test-pool-1-6b35426e-8gfj pvc-23b6b763-c010-11e9-ad45-42010a8001c8-rep-7d49c9f499-qcmcd RW running 10.28.27.13 gke-sai-bdd-test-pool-1-6b35426e-j23f pvc-23b6b763-c010-11e9-ad45-42010a8001c8-rep-7d49c9f499-xm6jp RW running 10.28.26.21 gke-sai-bdd-test-pool-1-6b35426e-4xcs
Using curl command
-
Get the controller pod of the Jiva volume using the command:
kubectl get pods -l openebs.io/controller=jiva-controller -n <pvc-namespace>
Example command:
kubectl get pods -l openebs.io/controller=jiva-controller -n default
Example output:
NAME READY STATUS RESTARTS AGE pvc-23b6b763-c010-11e9-ad45-42010a8001c8-ctrl-c45c44b9c-m7wnf 2/2 Running 0 12m
-
Exec into the controller pod the Jiva volume using the command
kubectl exec -it <controller-pod-name> -n <pvc-namespace> bash
Example command:
kubectl exec -it pvc-23b6b763-c010-11e9-ad45-42010a8001c8-ctrl-c45c44b9c-m7wnf -n default bash
Example output:
Defaulting container name to pvc-23b6b763-c010-11e9-ad45-42010a8001c8-ctrl-con. Use 'kubectl describe pod/pvc-23b6b763-c010-11e9-ad45-42010a8001c8-ctrl-c45c44b9c-m7wnf -n default' to see all of the containers in this pod. root@pvc-23b6b763-c010-11e9-ad45-42010a8001c8-ctrl-c45c44b9c-m7wnf:/#
-
Curl the details of the Jiva volume using the command:
curl http://localhost:9501/v1/volumes
Example output:
{"data":[{"actions":{"deleteSnapshot":"http://localhost:9501/v1/volumes/cHZjLTIzYjZiNzYzLWMwMTAtMTFlOS1hZDQ1LTQyMDEwYTgwMDFjOA==?action=deleteSnapshot","revert":"http://localhost:9501/v1/volumes/cHZjLTIzYjZiNzYzLWMwMTAtMTFlOS1hZDQ1LTQyMDEwYTgwMDFjOA==?action=revert","shutdown":"http://localhost:9501/v1/volumes/cHZjLTIzYjZiNzYzLWMwMTAtMTFlOS1hZDQ1LTQyMDEwYTgwMDFjOA==?action=shutdown","snapshot":"http://localhost:9501/v1/volumes/cHZjLTIzYjZiNzYzLWMwMTAtMTFlOS1hZDQ1LTQyMDEwYTgwMDFjOA==?action=snapshot"},"id":"cHZjLTIzYjZiNzYzLWMwMTAtMTFlOS1hZDQ1LTQyMDEwYTgwMDFjOA==","links":{"self":"http://localhost:9501/v1/volumes/cHZjLTIzYjZiNzYzLWMwMTAtMTFlOS1hZDQ1LTQyMDEwYTgwMDFjOA=="},"name":"pvc-23b6b763-c010-11e9-ad45-42010a8001c8","readOnly":"false","replicaCount":3,"type":"volume"}],"links":{"self":"http://localhost:9501/v1/volumes"},"resourceType":"volume","type":"collection"}
From the above JSON output, one can get details of the Jiva volume.