StorPool tree

Using the storpool_tree tool you can generate a visual representation of the StorPool tree.

Usage

The tool can be used on the command line in the following way:

storpool_tree <options> <properties>

When run without options and properties, the tool shows a simple visual representation of the volumes and snapshots:

storpool_tree
StorPool
   |- one-snap-01 [snapshot]
   |  `- one-img-07 [volume]
   |- one-img-12 [volume]
   |- one-snap-02 [snapshot]
   |  `- one-img-08 [volume]
   |- one-img-01 [volume]
   |- one-img-23 [volume]
   `- one-img-14 [volume]

The following sections provide more examples, as well as details on using the properties and options.

Properties

Optionally, you can list which volume or snapshot properties to be displayed. The properties you can use are those you can obtain when using the VolumesAndSnapshotsList, VolumesGetStatusQuick, or VolumesGetStatus API calls; for details, see the API reference. Here is an example with the templateName property specified:

storpool_tree -k templateName
StorPool
   |- one-snap-01 [snapshot] [templateName=ssd]
   |  `- one-img-07 [volume] [templateName=ssd]
   |- one-img-12 [volume] [templateName=ssd]
   |- one-snap-02 [snapshot] [templateName=ssd]
   |  `- one-img-08 [volume] [templateName=ssd]
   |- one-img-01 [volume] [templateName=ssd]
   |- one-img-23 [volume] [templateName=ssd]
   `- one-img-14 [volume] [templateName=ssd]

As shown in the example above, when you specify one or more properties you should also use the the -k / --show-keys option.

When using the tags property, if you need only certain elements to be displayed you can use the extended tags.name format. For example, if you want to see information only about the ‘’vc-policy’’ tag, you should specify the ‘’tags.vc-policy’’ to the tool. It is also possible to specify several tags this way.

Options

-c / --call {normal,quick,full}

Use an alternative to normal (VolumesAndSnapshotsList) call, choices: {'normal': 'VolumesAndSnapshotsList', 'quick': 'VolumesGetStatusQuick', 'full': 'VolumesGetStatus'}

-f / --false-hide

When a property value is a Boolean ‘False’, do not show it.

-g / --groupby-cluster

Show each sub-cluster separately.

-h / --help

Show a help message and exit.

--human

Display results in human-readable format, for example 123G or 12T. Useful when displaying properties related to storage size.

-k / --show-keys

Show the keys of the displayed properties. When you run the tool with this option you must specify one or more properties.

-m / --multicluster

Use multi-cluster call for volumes/snapshots collection. Note that this feature is NOT working and is experimental only.

--path PATH

Path to VolumesAndSnapshotsList, VolumesGetStatusQuick, or VolumesGetStatus API call JSON file.

-s / --stats STATS

Output a list of the last volume or snapshot in the chains longer than the provided number.

Examples

Displaying size of volumes and snapshots in human-readable format:

storpool_tree -k --human size
StorPool
   |- one-snap-01 [snapshot] [size=4.0GB]
   |  `- one-img-07 [volume] [size=4.0GB]
   |- one-img-12 [volume] [size=12.0GB]
   |- one-snap-02 [snapshot] [size=9.0GB]
   |  `- one-img-08 [volume] [size=9.0GB]
   |- one-img-01 [volume] [size=52.0GB]
   |- one-img-23 [volume] [size=12.0GB]
   `- one-img-14 [volume] [size=10.0GB]

Displaying parent names for volumes:

storpool_tree -k parentName
StorPool
   |- one-snap-01 [snapshot] [parentName=]
   |  `- one-img-07 [volume] [parentName=one-snap-01]
   |- one-img-12 [volume] [parentName=]
   |- one-snap-02 [snapshot] [parentName=]
   |  `- one-img-08 [volume] [parentName=one-snap-02]
   |- one-img-01 [volume] [parentName=]
   |- one-img-23 [volume] [parentName=]
   `- one-img-14 [volume] [parentName=]

Filtering the results from the above example with grep:

storpool_tree -k parentName | grep "one-snap-01"
   |- one-snap-01 [snapshot] [parentName=]
   |  `- one-img-07 [volume] [parentName=one-snap-01]

More information

Volumes and snapshots