PowerFlex SCLI Basics show some useful commands for managing a PowerFlex cluster by command line.
PowerFlex CLI (SCLI) is installed as part of the MDM component. It can be found in the following operational systems:

Before using most SCLI commands, you must log in using the following command (for the 4.5.2 version, for example):

As we can see in the following picture, the “scli –login“ command has worked; however, since this MDM node is not the “Primary MDM node,” all subsequent commands fail:



As showed you before, our Primary MDM is the “SDS03”. To switch the Primary MDM ownership to another MDM, we can execute the following command (in this example, we are switching the Primary MDM ownership from SDS03 (192.168.255.73) to SDS01 (192.168.255.71)):
scli --login --management_system_ip pfmp.lab.local --username admin
scli --switch_mdm_ownership --new_primary_mdm_ip 192.168.255.71

As shown in the above picture, we have switched the Primary MDM ownership from SDS03 to SDS01. We have tried to execute a command from SDS03, and we have received an error since this node is not the Primary MDM node anymore 😉
The best approach is to log in to SDS01 and run the commands from there!
Querying MDM Cluster Details
To query the MDM Cluster details:
scli --query_cluster

This command helps understand the MDM cluster topology (whether a 3-node or 5-node cluster). Moreover, we can see the following details:
— Virtual IP addresses and their associated interfaces (if in use);
— The Primary MDM node;
— The Secondary MDM node;
— Tie-Breakers nodes;
— Standby MDMs;
— All IP addresses for each MDM node.
Querying Storage Data Server (SDS) Nodes
To query all Storage Data Server (SDS) nodes:
scli --query_all_sds

As shown in the above picture, eleven (11) SDS nodes exist, divided into two different Protection Domains (PD-0 and PD-1).
Querying Protection Domain Details
To query details of each Protection Domain:
scli --query_protection_domain --protection_domain_name PD-0
scli --query_protection_domain --protection_domain_name PD-1

Querying Storage Pool Details
To query details of each Storage Pool:
scli --query_storage_pool --protection_domain_name PD-0 --storage_pool_name SP-SW_SSD-0
scli --query_storage_pool --protection_domain_name PD-1 --storage_pool_name SP-SW_SSD-1

Querying Storage Data Client (SDC) Nodes
To query all Storage Data Client (SDS) nodes:
scli --query_all_sdc

As shown in the above picture, fifteen (15) SDC nodes exist. The SDC ID, SDC Name, Ips, Connected GUID, OS Type, Version, and other details can be seen.
Querying Details of a Specific Storage Data Server (SDS) Nodes
To query details of a specific Storage Data Server (SDS) node:
scli --query_sds --sds_name SDS01

Querying Details of a Specific Disk Device on SDS Node
To query details of a specific disk device for a Storage Data Server (SDS) node:
scli --query_sds_device_info --sds_name SDS01 --device_path /dev/sdc

Grabbing All Disk Devices of a Specific SDS
As we know, each SDS node has local disk devices that are used to create a storage pool. If you need to get details of all disk devices of a specific SDS node, you can use the following command line – In this example, the SDS name is “SDS01” (replace it with your SDS name):
scli --query_sds_device_info --sds_name SDS01 --all_devices | grep -i "Device ID:"
As shown, this SDS node has four disk devices:

Grabbing All Disk Devices on All SDS
Otherwise, if you need to get all disk devices for all SDS nodes present on the PowerFlex environment, you can use the following command:
scli --query_all_sds | grep "SDS ID" | awk -F':' '{print $3}' | sed 's/State//g' | sed 's/^ //' | while read sds; do
echo "======================================================================="
echo "SDS Name: $sds"
scli --query_sds_device_info --sds_name "$sds" --all_devices | egrep "Device ID:|Device State:|Aggregated State:"
echo "" # Adds a blank line for separation
done
This command has an enormous output, so it was cut (we are showing only the first entries).
As shown, for each disk device, we can see its details such as device ID, device name, device path, and the device state – This command can be helpful to perform a disk device health check in a PowerFlex environment, for instance:

Getting the SDS Connection Status
Each SDS node has the “sds” daemon running on it. So, based on it, we can check the SDS connection status if the following command:
scli --query_all_sds | grep "SDS ID:" | awk -F':' '{print $3, $4}' | sed 's/State //g' | awk '{print $1, "-", $2}' | sed 's/.$//'
As shown, all SDS nodes are “Connected”:

In case of problems with some SDS nodes (some network issues or something related that cause a network disconnection), we can see a different status than “Connected”. As shown, the SDS node “SDS05” is “Disconnected”:

You can access the SDS as disconnected and perform some troubleshooting (e.g., checking the status of the SDS daemon and network connectivity).
Checking SDS Maintenance Mode
We can use the following command to check if there are any SDS nodes in maintenance mode:
scli --query_all_sds | grep "SDS ID:" | grep "IN_MAINTENANCE" | awk -F' ' '{print $5 " - " $13}'
If there is a node in maintenance mode, we will see it in the command output:

Getting the SDC Connection Status
In the same way as SDS, each SDC establishes a connection with the MDM cluster. So, we can see their connection status. We can use the following command:
scli --query_all_sdc | grep "SDC ID:" | awk -F" " '{print $5 " - Status: " $9}'
In the first output column, we can see the SDC name, followed by its status (Connected or Disconnected):

Grabbing all PowerFlex Volumes
To grab all volumes in the PowerFlex environment:
scli --query_all_volumes

We can see details of each PowerFlex Volume. So, if you need to get the creation time of all Volumes, the following command can be used:
scli --query_all_volumes | grep "Volume ID:" | awk -F' ' '{print $5}' | while read volume; do
echo "================================================"
echo "Volume Name: $volume"
scli --query_volume --volume_name $volume | egrep "Creation time:"
echo "" # Adds a blank line for separation
done
Since the output was enormous, it was cut:

Grabbing Current IOPS for Each PowerFlex Volume
The following command will get the read-and-write IOPS details for all PowerFlex Volumes:
scli --query_all_volumes | grep "Volume ID:" | awk -F' ' '{print $5}' | while read volume; do
echo "================================================"
echo "Volume Name: $volume"
echo "Timestamp:" `date`
scli --query_volume --volume_name $volume | egrep "Reads:|Writes:"
echo "" # Adds a blank line for separation
done

Grabbing the Mapping Details for Each PowerFlex Volume
After creating a volume, we must map it to an SDC to use it effectively. The following command lists all Volumes and which SDCs are using it:
scli --query_all_volumes | grep "Volume ID:" | awk -F' ' '{print $5}' | while read volume; do
echo "================================================"
echo "Volume Name: $volume"
scli --query_volume --volume_name $volume | egrep "Mapping:|Host ID:"
echo "" # Adds a blank line for separation
done

To Wrapping This Up
PowerFlex CLI (SCLI) is an essential tool every PowerFlex Administrator must know.
We showed some examples of using. However, there are many possibilities with this tool. I highly recommended to check the CLI reference to see it: