Basics operations using pxctl
In this document, we are going to explore the basic operations available through the Portworx command-line tool- pxctl.
By default, the CLI displays the information in human readable form.
pxctl provides the capability to perform fine-grained control of the Portworx resources cluster-wide. Also, it lets the user manage volumes, snapshots, cluster resources, hosts in the cluster and software upgrade in the cluster. Run pxctl --help to learn more about the available commands.
In addition, every command takes in a --json flag which converts the output to a machine-parsable JSON format. You can do something like the following to save the output in JSON format:
pxctl status --json > status.json
In most production deployments, you will provision volumes directly using Docker or your scheduler (such as a Kubernetes pod spec). However, pxctl also lets you directly provision and manage storage. In addition, pxctl has a rich set of cluster-wide management features which are explained in this document.
All operations available through pxctl are reflected back into the containers that use Portworx storage. In addition to what is exposed in Docker volumes, pxctl:
- Gives access to Portworx storage-specific features, such as cloning a running container’s storage.
- Shows the connection between containers and their storage volumes.
- Lets you control the Portworx storage cluster, such as adding nodes to the cluster. (The Portworx tools refer to servers managed by Portworx storage as nodes.)
The scope of the pxctl command is global to the cluster. Running pxctl on any node within the cluster, therefore, shows the same global details. But pxctl also identifies details specific to that node.
The current release of pxctl is located in the /opt/pwx/bin/ directory of every worker node and requires that you run it as a privileged user.
Let's look at some simple commands.
Version
Here's how to find out the current version:
pxctl --version
pxctl version 2.7.0.0-886586d
Status
This section has been moved to the status page.