saravananp
9 hours agoDay Hiker I
A list of useful Purity CLI commands to manage Pure Flash Storage arrays.
| "pureadmin" commands | |
| The pureadmin command displays and manage administrative accounts in Pure Flash Storage Array (22 Commands) | Explanation |
| pureadmin create testuser --api-token | Generate an API token for the user testuser |
| pureadmin create testuser --api-token --timeout 2h | Create API Token for testuser valid for 2 hours |
| pureadmin create testuser --role storage_admin | Create user testuser with storage_admin role. Possible roles are readonly, ops_admin, storage_admin, array_admin |
| pureadmin delete --api-token | Delete API Token for current user |
| pureadmin delete testuser | Delete user testuser from Flash Array |
| pureadmin delete testuser --api-token | Delete API Token for user testuser |
| pureadmin global disable --single-sign-on | This will disable single sign-on on the current array. Enabling single sign-on gives LDAP users the ability to navigate seamlessly from Pure1 Manage to the current array through a single login. |
| pureadmin global enable --single-sign-on | This enables single sign-on on the current array. Enabling single sign-on gives LDAP users the ability to navigate seamlessly from Pure1 Manage to the current array through a single login. |
| pureadmin global list | List the global administration attributes like Lockout Duration, Maximum Login Attempts, Minimum Password Length, etc.. |
| pureadmin global setattr --lockout-duration 1m | Set the lockout duration to 1 minute after maximum unsuccessful login attempts. |
| pureadmin global setattr --max-login-attempts 3 | Set the maximum failed login attempts to 3 before the user get locked out. |
| pureadmin global setattr --min-password-length 8 | Set the minimum length of characters required for all the local user account passwords to 8. Minimum length allowed is 1. This will not affect the existing user accounts, but all future password assignment must meet the new value. |
| pureadmin list | List all the users configured in the Flash Array |
| pureadmin list --api-token | List all the users with api tokens configured |
| pureadmin list --api-token --expose | List all the users with api tokens configured and expose the api token for the current user loggedin. |
| pureadmin list --lockout | List all the user accounts that are currently lockout |
| pureadmin refresh --clear | Clears the permission cache for all the users |
| pureadmin refresh --clear testuser | Clears the permission cache for testuser |
| pureadmin refresh testuser | Refresh the permission cache for testuser |
| pureadmin reset testuser --lockout | Unlock locked user testuser |
| pureadmin setattr testuser --password | Change the password for the user testuser |
| pureadmin setattr testuser --role array_admin | Change the role of the user testuser to array_admin role. Possible roles are readonly, ops_admin, storage_admin, array_admin |
| "purealert" commands | |
| The purealert command manages alert history and the list of designated email addresses for alert notifications (8 Commands) | Explanation |
| purealert flag 121212 | Flag an alert with ID 121212. This will appear in the flagged alert list. |
| purealert list | List all the alerts generated in the Pure Flash Array |
| purealert list --filter "issue='failure'" | List all the alerts generated for failures |
| purealert list --filter "severity='critical'" | List all the alerts with Critical severity. |
| purealert list --filter "state='closed'" | List all the closed alerts |
| purealert list --filter "state='open'" | List all the alerts in Open state |
| purealert list --flagged | List all the alerts that are flagged. By default all alerts are flagged. We can unflag command once those are resolved. |
| purealert unflag 121212 | Unflag alert with ID 121212. This will not appear in the flagged alert list. |
| "purearray" commands | |
| The purearray command displays attributes and monitors I/O performance in Pure Flash Storage Array (24 Commands) | Explanation |
| purearray connect --management-address 10.0.0.1 --type async-replication --connection-key | Connects the local array to remote array 10.0.0.1 for asynchronous replication using the connection key. The Connection key will be prompted to enter. |
| purearray connect --management-address 10.0.0.1 --type sync-replication --connection-key | Connects the local array to remote array 10.0.0.1 for synchronous replication using the connection key. The Connection key will be prompted to enter. |
| purearray connect --management-address 10.0.0.1 --type sync-replication --replication-transport ip -- connection-key | Connects the local array to remote array 10.0.0.1 for synchronous replication via Ethernet transport using the connection key. The Connection key will be prompted to enter. |
| purearray disable phonehome | Disable phonehome or dialhome feature of array. |
| purearray disconnect 10.0.0.1 | Disconnects array 10.0.0.1 from the local array connected for remote replication. |
| purearray enable phonehome | Enable phonehome or dialhome feature of array. |
| purearray list | Display the array name,serial number and firmware version |
| purearray list --connect | Display remotely connected arrays for replication |
| purearray list --connect --path | Display arrays connected for remote replication along with connection paths |
| purearray list --connect --throttle | Display the replication throttle limit |
| purearray list --connection-key | Display the connection key that can be used to connect to the array |
| purearray list --controller | List all the controllers connected to the Array. This will also display the model and status of each controller |
| purearray list --ntpserver | List the NTP servers configured |
| purearray list --phonehome | Display the dial home configuration status of the Array |
| purearray list --space | Display the capacity and usage statistics information of the Array. |
| purearray list --space --historical 30d | Display the capacity and usage statistics information of the Array since last 30 days |
| purearray list --syslogserver | List the syslog server names configured to push the logs in pure array |
| purearray monitor --interval 4 --repeat 5 | Display the array-wide IO performance of a Flash Array in every 4 seconds for 5 times. |
| purearray remoteassist --status | check the Remote Assist is active or inactive |
| purearray rename MYARRAY001 | Set the name of the array to MYARRAY001 |
| purearray setattr --ntpserver '' | Remove all the NTP servers configured for pure array |
| purearray setattr --ntpserver time.google.com | Set the NTP server |
| purearray setattr --syslogserver '' | Remove all the syslog server servers configured for pure array |
| purearray setattr --syslogserver log.server.com | set the syslog server for pure array |
| "pureaudit" commands | |
| The pureaudit command displays and manages the audit logs record details in Pure Flash Storage Array (7 Commands) | Explanation |
| pureaudit list | Display the list of audit records. Audit trail records are created whenever administrative actions are perfromed by a user (for eg: creating, destroying, eradicating a volume) |
| pureaudit list --filter 'command="purepod" and subcommand="create"' | List all the audit records for purepod create command executed in the array |
| pureaudit list --filter 'command="purepod" and user="pureuser"' | List all the audit records for purepod commands executed by pureuser in the array |
| pureaudit list --filter 'command="purepod"' | List all the audit records for purepod command executed in the array |
| pureaudit list --filter 'user = "root"' | Display the list of audit records for the root user |
| pureaudit list --limit 10 | Display the first 10 rows of audit records |
| pureaudit list --sort user | Display the list of audit records sorted by the user field. By default the records are sorted by the time field |
| "pureconfig" commands | |
| The pureconfig command provides commands to reproduce the current Pure Flash Storage Array configuration (4 Commands) | Explanation |
| pureconfig list | Display list of commands to reproduce the volumes, hosts, host groups, connections, network, alert and array configurations. Copying this and running in another array will create an exact copy. |
| pureconfig list --all | Displays all the commands required to reproduce the current FlashAarray configuration of hosts, host groups, pods, protection groups, volumes, volume groups, connections, file systems and directories, alert, network, policies, and support. |
| pureconfig list --object | Displays the object configuration of the FlashArray including hosts, host groups, pods, protection groups, volumes, volume groups, and connections, as well as file systems and directories if file services are enabled. |
| pureconfig list --system | Displays the system configuration of the flah array including network, policies, alert and support |
| puredns commands | The puredns command manages the DNS attributes for an arrays administrative network. (4 Commands) |
| "puredns" list | |
| Display the current DNS parameters configured in the array. This includes the domain suffixes and IP addresses of the name servers | Explanation |
| puredns setattr --domain "" | Removes the domain suffix from Purity//FA DNS queries |
| puredns setattr --domain test.com --nameservers 192.168.0.10,192.168.2.11 | Add the IPv4 addresses of two DNS servers for Array to use to resolve hostnames to IP addresses, and the domain suffix test.com for DNS searches. |
| puredns setattr --nameservers"" | Unassigns DNS server IP addresses from the DNS entry. This will stop making DNS entries. |
| "puredrive" commands | |
| The puredrive command provides information about the Flash Drives and NVRAM modules in Pure Flash Storage Array (6 Commands) | Explanation |
| puredrive admit | Admit all drive modules that have been added or connected but not yet admitted to the array. Once successfully admitted, the status of the drive modules will change from unadmitted to healthy. |
| puredrive list | List all the flash drive modules in an Array. This will also display the capacity of each module. |
| puredrive list --spec | List all the flash drive modules in an Array along with Protocol( SAS/NVME) information |
| puredrive list --total | List all the flash drive modules in an Array with the total capacity figure |
| puredrive list CH0.BAY10 | Display information about flash drive BAY10 in CH0 |
| puredrive list CH0.BAY10 --pack | Display information about flash drive BAY10 in CH0 and all other drives in the same pack |