This document explains how you can get detailed information about the settings and the usage of your Portworx volumes. This can be used to investigate various aspects related to your Portworx cluster such as identifying bottlenecks or improving the overall performance.
Inspect a volume
To inspect a volume, run the
pxctl volume inspect command with the name of the volume as a parameter. The following example inspects a volume called
pxctl volume inspect testVol
Volume : 970758537931791410 Name : testVol Size : 1.0 GiB Format : ext4 HA : 1 IO Priority : LOW Creation time : Feb 26 16:29:53 UTC 2019 Shared : no Status : up State : detached Reads : 0 Reads MS : 0 Bytes Read : 0 Writes : 0 Writes MS : 0 Bytes Written : 0 IOs in progress : 0 Bytes used : 33 MiB Replica sets on nodes: Set 0 Node : 10.99.117.133 Replication Status : Detached
By knowing what the fields from above mean, you can get a deeper insight into your volume’s usage. Below, we take a closer look at these fields:
- Volume: represents the ID of the volume. Every time a new volume gets created, Portworx generates a unique ID and assigns it to the newly created volume.
- Size: the size of the volume expressed in binary Gigabytes (GiB)
- Format: the file system used to store data. Currently, Portworx supports
- HA: represents the replication factor for the volume. As an example, if a volume has a replication factor of 3, it means the data is protected on 3 separate nodes.
You can set the replication factor while creating the volume, by running the
pxctl volume create command and passing it the
pxctl volume create testVol --repl=2
For applications that require node level availability and read parallelism across nodes, Portworx recommends setting a replication factor of 2 or 3. Note that the maximum replication factor is 3.
You can also modify the replication factor of a volume by running the
pxctl volume ha-update and passing it the following flags:
--replwith the new replication factor
--nodewith the ID(s) of the new node(s) to which the data will be replicated. Use a comma-separated list to specify more than one ID.
As an example, here’s how you can update the replication factor of a volume called
pxctl volume ha-update --repl=3 --node b1aa39df-9cfd-4c21-b5d4-0dc1c09781d8 testVol
See the updating volumes page for more details.
IO Priority: Portworx classifies disks into three different performance levels:
Then, it groups the volumes into separate pools. To run a low latency transactional workload like a database, create the volume with the
--io_priority flag set to
high as in the following example:
pxctl volume create --io_priority high volume-name
See the class-of-service page to get a better understanding of how performance levels work in Portworx. Additionally, note that Portworx provides an easy way to manage storage pools through the
pxctl service pool command.
- Creation time: indicates the creation date and time of the volume.
- Shared: this field tells whether the volume is
sharedor not. A shared volume is available to multiple containers running on different hosts at the same time. See the shared volumes page for more details
- Status: indicates the status of the volume. Possible values are
Upmeans that Portworx created the volume successfully.
Pendingmeans that Portworx currently creates the volume.
- State: shows whether the volume is
Attachedmeans that the volume is attached to a node and you can perform read and write operations on the volume.
Detachedmeans that the volume is not used and you can’t perform read and write operation on the volume.
- Reads: the number of
readoperations served by the volume.
- Reads MS: the total amount of time spent doing reads, expressed in milliseconds.
- Bytes Read: measures the total number of bytes read from the volume.
- Writes: the number of
writeoperations served by the volume.
- Writes MS: the total amount of time spent doing write operations, expressed in milliseconds.
- Bytes Written: represents the total amount of bytes written to the volume.
- IOs in progress: tells the number of IO operations currently in progress.
- Bytes used: indicates the amount of space used on the volume, expressed in KiB.
- Replication Status: tells whether the volume replication feature is disabled (
Detached) or enabled (
Inspect multiple volumes
pxctl, you can also inspect multiple volumes in one command as in the following example:
pxctl volume inspect testVol testVol2
Volume : 188586323847560484 Name : testVol Size : 1.0 GiB Format : ext4 HA : 1 IO Priority : LOW Creation time : Jul 2 14:57:11 UTC 2019 Shared : no Status : up State : detached Reads : 0 Reads MS : 0 Bytes Read : 0 Writes : 0 Writes MS : 0 Bytes Written : 0 IOs in progress : 0 Bytes used : 340 KiB Replica sets on nodes: Set 0 Node : 22.214.171.124 (Pool 0) Replication Status : Detached Volume : 1089720565647069203 Name : testVol2 Size : 1.0 GiB Format : ext4 HA : 1 IO Priority : LOW Creation time : Jul 4 16:37:02 UTC 2019 Shared : no Status : up State : detached Reads : 0 Reads MS : 0 Bytes Read : 0 Writes : 0 Writes MS : 0 Bytes Written : 0 IOs in progress : 0 Bytes used : 340 KiB Replica sets on nodes: Set 0 Node : 126.96.36.199 (Pool 0) Replication Status : Detached