mayactl
The following commands can be run using mayactl to get the details of OpenEBS volume, StoragePool and installed version.
- OpenEBS volume related
- mayactl volume list
- mayactl volume stats
- mayactl volume describe
- OpenEBS StoragePool related
- mayactl pool list
- mayactl pool describe
- OpenEBS version related
For getting access to mayactl
command line tool, you have to login or execute into the maya-apiserver pod on Kubernetes. The steps are outlined below.
Find out the name of the maya-apiserver
Following is an example output.
maya-apiserver-7f5689b96b-tfssh 1/1 Running 0 10d
It is possible that there are multiple instances of maya-apiserver pods for scaling purposes. You can run mayactl in any one of them. Shell into one of the pods using command . You can do as following way.
kubectl exec -it <maya-apiserver-podname> /bin/bash -n openebs
You will get access to the bash shell of maya-apiserver pod like shown below.
bash-4.3#
Once you are inside the maya -apiserver,use mayactl help command for more details.
mayactl help
Maya means ‘Magic’ a tool for storage orchestration Usage: mayactl [command] Available Commands: completion Outputs shell completion code for the specified shell (bash or zsh) help Help about any command pool Provides operations related to a storage pool version Prints version and other details relevant to maya volume Provides operations related to a Volume
mayactl for OpenEBS Storage Volume
OpenEBS storage volume command usage examples are shown below.
Example Output:
The following commands helps in operating a Volume such as create, list, and so on. Usage: mayactl volume [options] [args] Examples: > List Volumes: $ mayactl volume list > Statistics of a Volume: $ mayactl volume stats —volname > Statistics of a Volume created in ‘test’ namespace: $ mayactl volume stats —volname --namespace test > Info of a Volume: $ mayactl volume describe —volname > Info of a Volume created in ‘test’ namespace: $ mayactl volume describe —volname --namespace test Usage: mayactl volume [command] Available Commands: describe Displays Openebs Volume information list Displays status information about Volume(s) stats Displays the runtime statisics of Volume
The following command shows the list of all OpenEBS volumes including both Jiva and cStor.
mayactl volume list
Example Output:
Namespace Name Status Type Capacity StorageClass Access Mode ————- —— ——— —— ———— ——————- —————- openebs pvc-dc3cb979-51ec-11e9-803f-42010a800179 Running cstor 8G openebs-cstor-sparse ReadWriteOnce
The following command shows the description of a OpenEBS volume.
Example Output:
Portal Details : ———— ———— IQN : iqn.2016-09.com.openebs.cstor:pvc-dc3cb979-51ec-11e9-803f-42010a800179 Volume : pvc-dc3cb979-51ec-11e9-803f-42010a800179 Portal : 10.67.247.34:3260 Size : 8G Controller Status : running,running,running Controller Node : gke-ranjith-082-default-pool-2cd2b6cb-l4ck Replica Count : 3 Replica Details : ————————- NAME STATUS POOL NAME NODE —— ——— ————- ——- pvc-dc3cb979-51ec-11e9-803f-42010a800179-cstor-sparse-pool-ejs2 Running cstor-sparse-pool-ejs2 gke-ranjith-082-default-pool-2cd2b6cb-dphl pvc-dc3cb979-51ec-11e9-803f-42010a800179-cstor-sparse-pool-gf1d Running cstor-sparse-pool-gf1d gke-ranjith-082-default-pool-2cd2b6cb-l4ck pvc-dc3cb979-51ec-11e9-803f-42010a800179-cstor-sparse-pool-m8cy Running cstor-sparse-pool-m8cy gke-ranjith-082-default-pool-2cd2b6cb-x571
The following command shows the live statistics of OpenEBS volume.
Example Output:
OpenEBS storage pool command usage examples are shown below.
mayactl pool
It will show the available commands which can run with mayactl
for getting details of OpenEBS pools.
Command provides operations related to a storage pools. Usage: mayactl pool [options] [args] Examples: > Lists pool: $ mayactl pool list Usage: mayactl pool [command] Available Commands: describe Describes the pools list Lists all the pools
The following command shows the list of all OpenEBS StoragePools.
mayactl pool list
Example Output:
POOL NAME NODE NAME POOL TYPE ————- ————- ————- cstor-pool1-5lwv node3.mayalab.com striped cstor-pool1-qba6 node2.mayalab.com striped cstor-pool1-v4oy node4.mayalab.com striped
The following command show the description of OpenEBS StoragePool.
Example Output:
Pool Details : ——— ——— Storage Pool Name : cstor-pool1-5lwv Node Name : node3.mayalab.com CAS Template Used : cstor-pool-create-default-0.9.0 CAS Type : cstor StoragePoolClaim : cstor-pool1 UID : fb2bd1d8-2f88-11e9-a23b-0050569331ce Pool Type : striped Over Provisioning : false Disk List : ——— ——— disk-42b4fb20cd36896dfc2a486b977363de
mayactl Version
OpenEBS installed version can be obtained using the following command. This will show the status of maya-apiserver and its URL.
Example Output:
Version: 1.0.0-released Git commit: 338657c7ffccea2117dec79cb727e58f369f03d5 GO Version: go1.11.2 GO ARCH: amd64 GO OS: linux m-apiserver url: http://10.76.1.12:5656 m-apiserver status: running