ADVERTISEMENT

Pure Storage CLI Questions

The How to guide for Pure Storage CLI Commands

  • purearray list
    Display the array name,serial number and firmware version

  • purearray list --connect
    Display remotely connected arrays for replication

  • purearray list --controller
    List all the controllers connected to the Array. This will also display the model and status of each controller

  • 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 --phonehome
    Display the dial home configuration status of the Array

  • 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 monitor --interval 4 --repeat 5
    Display the array-wide IO performance of a Flash Array in every 4 seconds for 5 times.

  • purearray rename MYARRAY001
    Set the name of the array to MYARRAY001

  • purehw list
    List all the hardware components along with information like status, temperature, voltage etc.

  • purehw list --spec
    List all the hardware components along with information like Model name, Part number and serial number

  • purehw list CT0.FC0
    Display information about FC port 0 on controller 0. Port status and speed also be displayed.

  • purehw list CT0 --spec
    Display model, part number, and serial number of Controller 0

  • purehw list --type fc
    List all the FC ports in an Array with status and speed information

  • purehw list --type bay
    List all the Drive modules in an Array

  • purehw list --type bay --spec
    List all the Drive modules in an Array along with part number and serial number

  • purehw list --type ct
    List all the Controller in an Array

  • purehw list --type eth
    List all the Ethernet ports in an Array

  • puredrive list
    List all the flash drive modules in an Array. This will also display the capacity of each module.

  • puredrive list --total
    List all the flash drive modules in an Array with the total capacity figure

  • puredrive list --spec
    List all the flash drive modules in an Array along with Protocol( SAS/NVME) information

  • 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

  • purevol create --size 10G MY_VOLUME_001
    Create a Virtual volume called MY_VOLUME_001 of size 10GB

  • purevol create --size 10G MY_VOLUME_001 MY_VOLUME_002
    Create Virtual volumes MY_VOLUME_001 and MY_VOL_SIZE_002 of size 10GB

  • purevol create --size 10G MY_VOLUME_001 --bw-limit 10M
    Create a Virtual volume MY_VOLUME_001 of size 10GB and limit is bandwidth to 10MB/s

  • purevol rename MY_VOL_001 MY_VOL_002
    Rename virtual volume MY_VOL_001 to MY_VOL_002

  • purevol setattr --size 2G MY_VOL_001
    Increase the size of MY_VOL_001 to 2GB

  • purevol setattr --bw-limit 1M MY_VOL_001
    Change the bandwidth limit of MY_VOL_001 to 1MB/s

  • purevol setattr --bw-limit 1M MY_VOL_001 MY_VOL_002
    Change the bandwidth limit of MY_VOL_001 and MY_VOL_002 to 1MB/s

  • purevol setattr --size 2G MY_VOL_001 MY_VOL_002
    Increase the size of MY_VOL_001 and MY_VOL_002 to 2GB

  • purevol destroy MY_VOL_001
    Destroy virtual volume MY_VOL_001. This volume can be recovered within 24hrs. After that, physical storage occupied this volume will be reclaimed.

  • purevol recover MY_VOL_001
    Recover virtual volume MY_VOL_001 which is destroyed earlier.

  • purevol eradicate MY_VOL_001
    Eradicate virtual volume MY_VOL_001 which is destroyed earlier. This will fully destroy the volume and not be able to recover further.

  • purevol truncate --size 1G MY_VOL_001
    Reduce the size of MY_VOL_001 to 1GB

  • purevol list
    List all the Virtual Volume

  • purevol list --snap
    List all the snap shots

  • purevol snap MY_VOL_001
    Create snap shot of MY_VOL_001. If it is first snap then MY_VOL_001.2 will be created

  • purevol snap MY_VOL_001 --suffix PRD
    Create snap shot of MY_VOL_001 with PRD as a suffix. MY_VOL_001.PRD will be created

  • purevol list --pending
    List all the Virtual Volumes including destroyed but pending for eradication

  • purevol list --pending-only
    List all the destroyed Virtual Volumes pending for eradication

  • purevol copy MY_VOL_001 MY_VOL_002
    Create a copy MY_VOL_001 and name it as MY_VOL_002. If MY_VOL_002 already exists this will throw and error.

  • purevol copy MY_VOL_001 MY_VOL_002 --overwrite
    Copy data from MY_VOL_001 to an existing volume MY_VOL_002. Contents of MY_VOL_002 will be overwritten.

  • purevol list MY_VOL_001
    List information about MY_VOL_001

  • purevol list MY_VOL*
    List all the Virtual Volumes prefixed with MY_VOL

  • purehost create MY-SERVER-001
    Create a host object called MY-SERVER-001. HBA wwns can be added later using purehost setattr command.

  • purehost create MY-SERVER-001 --wwnlist 1000000000000001,10:00:00:00:00:00:00:01
    Create a host object called MY-SERVER-001 and add HBA wwns to it

  • purehost setattr MY-SERVER-001 --wwnlist 1000000000000003
    Update the contents of an existing host with new wwn 1000000000000003

  • purehost setattr MY-SERVER-001 --wwnlist ""
    Remove all wwns from MY-HOST-001

  • purehost create MY-SERVER-001 MY-SERVER-002
    Create hosts MY-SERVER-001 and MY-HOST-002

  • purehost delete MY-SERVER-001
    Delete host MY-SERVER-001

  • purehost delete MY-SERVER-001 MY-SERVER-002
    Delete hosts MY-SERVER-001 MY-SERVER-002

  • purehost rename MY-SERVER-001 YOUR-SERVER-001
    Rename host MY-SERVER-001 to YOUR-SERVER-001

  • purehost setattr MY-SERVER-001 --addwwnlist 1000000000000003
    Add new HBA wwn 1000000000000003 to host MY-HOST-001. 1000000000000003 should not be part of any other host.

  • purehost setattr MY-SERVER-001 --remwwnlist 1000000000000003
    Remove HBA wwn 1000000000000003 from host MY-SERVER-001

  • purevol connect MY_VOL_001 --host MY-SERVER-001
    Connect volume MY_VOL_001 to host MY-SERVER-001. This will Provide the R/W access to the volume.Next available lun address will used by default.

  • purevol connect MY_VOL_001 --host MY-SERVER-001 --lun 10
    Connect volume MY_VOL_001 to host MY-SERVER-001 and assign LUN id 10. This will Provide the R/W access to the volume.

  • purevol disconnect MY_VOL_001 --host MY-SERVER-001
    Disconnect volume MY_VOL_001 from host MY-SERVER-001. This will remove the visibility of the volume to the host.

  • purehost connect MY-SERVER-001 --vol MY_VOL_001
    Connect volume MY_VOL_001 to host MY-SERVER-001. This will Provide the R/W access to the volume.Next available lun address will used by default.

  • purehost connect MY-SERVER-001 --vol MY_VOL_001 --lun 10
    Connect volume MY_VOL_001 to host MY-SERVER-001 and assign LUN id 10. This will Provide the R/W access to the volume.

  • purehost disconnect MY-SERVER-001 --vol MY_VOL_001
    Disconnect volume MY_VOL_001 from host MY-SERVER-001. This will remove the visibility of the volume to the host.

  • purevol connect MY_VOL_001 MY_VOL_002 --host MY-SERVER-001
    Connect volumes MY_VOL_001 and MY_VOL_002 to host MY-SERVER-001

  • purevol discconnect MY_VOL_001 MY_VOL_002 --host MY-SERVER-001
    Disconnect volumes MY_VOL_001 and MY_VOL_002 from host MY-SERVER-001

  • purehost connect MY-SERVER-001 MY-SERVER-002 --vol MY_VOL_001
    Connect volume MY_VOL_001 to hosts MY-SERVER-001 and MY-SERVER-002

  • purehost disconnect MY-SERVER-001 MY-SERVER-002 --vol MY_VOL_001
    Disconnect volume MY_VOL_001 from hosts MY-SERVER-001 and MY-SERVER-002

  • purehgroup create MY-HOSTS
    Create a hostgroup called MY-HOSTS

  • purehgroup delete MY-HOSTS
    Delete empty hostgroup MY-HOSTS.

  • purehgroup create MY-HOSTS -hostlist MY-HOST-001,MY-HOST-002
    Create hostgroup MY-HOSTS and add existing hosts MY-HOST-001 and MY-HOST-002 in to it

  • purehgroup delete MY-HOSTS_1 MY-HOSTS-2
    Delete empty hostgroups MY-HOSTS-1 and MY-HOSTS-2

  • purehgroup setattr MY-HOSTS --addhostlist MY-HOST-002,MY-HOST-003
    Add MY-HOST-002 and MY-HOST-003 to existing hostgroup MY-HOSTS

  • purehgroup setattr MY-HOSTS --remhostlist MY-HOST-002,MY-HOST-003
    Remove MY-HOST-002 and MY-HOST-003 from hostgroup MY-HOSTS

  • purehgroup setattr MY-HOSTS --hostlist MY-HOST-002,MY-HOST-003
    Replace members of MY-HOSTS with new hosts MY-HOST-002 and MY-HOST-003

  • purehgroup rename MY-HOSTS YOUR-HOSTS
    Rename hostgroup MY-HOSTS with YOUR-HOSTS

  • purehgroup connect MY-HOSTS --vol MY_VOL_001
    Connect volume MY_VOLUME_001 to hostgroup MY-HOSTS

  • purehgroup disconnect MY-HOSTS --vol MY_VOL_001
    Disconnect volume MY_VOLUME_001 from hostgroup MY-HOSTS

  • purehgroup connect MY-HOSTS --vol MY_VOL_001 --lun 100
    Connect volume MY_VOLUME_001 to hostgroup MY-HOSTS and assign LUN id 100

  • purehgroup list
    List all the hostgroups a with member hosts

  • purehgroup list --connect
    List all the hostgroups and connected volumes

  • purevol connect MY_VOL_001 --hgroup MY-HOSTS
    Connect volume MY_VOL_001 to hostgroup MY-HOSTS

  • purevol disconnect MY_VOL_001 --hgroup MY-HOSTS
    Disconnect volume MY_VOL_001 from hostgroup MY-HOSTS

  • purevol destroy MY_VOL_001 MY_VOL_002
    Destroy virtual volumes MY_VOL_001 and MY_VOL_001. These volumes can be recovered within 24hrs. After that, physical storage occupied these volumes will be reclaimed.

  • purevol eradicate MY_VOL_001 MY_VOL_002
    Eradicate virtual volumes MY_VOL_001 and MY_VOL_002 which are destroyed earlier. This will fully destroy the volumes and not be able to recover further.

  • purehgroup list --space
    List all the hostgroups with the total capacity of volumes provisioned to each and the consumption

  • purehgroup setattr MY-HOSTS --hostlist ""
    Remove all the hosts from hostgroup MY-HOSTS

  • 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.

  • pureport list
    Display all the target ports within the Flash Array. This includes FC, iSCSI and NVME ports. This command also displays WWNs of FC ports iSCSI Qualified Names(IQNs) for iSCSI ports and NVMe Qualified Names(NQNs) for NVMe ports.

  • pureport list --initiator
    Display all the host initiator WWNs, IQNs, NQNs known for the Flash Array. This also shows the target ports on which the initiators are eligible to communicate.

  • pureport list --raw --filter "name='*FC*'"
    Display all the Fibre Channel Ports with its WWNs in the Flash Arrays

  • pureport list --raw --filter "name='CT0.FC*'"
    Display all the Fibre Channel Ports in Controller 0 with its WWNs in the Flash Arrays

  • pureport list --raw --filter "name='*ETH*'"
    Display all the iSCSI Ports with its IQNs in the Flash Arrays

  • pureport list --initiator --raw --filter "name='CT0.FC0'"
    Display all HBA WWNs logged to the FC port CT0.FC0

  • pureport list --initiator --raw --filter "initiator.wwn='1000000000000001'"
    Search for HBA WWN 1000000000000001 and on which FC port its been logged in to.

  • purevol list --sort size
    List all the volumes sorted by size in descending order

  • purevol list --sort created
    List all the volumes sorted by create time in descending order

  • purevol list --sort serial
    List all the volumes sorted by serial number descending order

  • purevol list --filter "size='20T'"
    List all the volumes with 20TB size

  • purehost list
    List all the hosts in a Flash Array with its member WWNs or IQNs or NQNs. This will also show the Host Groups if it part of any.

  • purehost list --all
    List all the hosts in a Flash Array along with its member initiators connected to volumes through target ports

  • purehost list --connect
    List all the hosts in a Flash Array which have connected volumes

  • purehost list --connect --shared
    List all the hosts with shared volumes assigned through hostgroup

  • purehost list --connect --private
    List all the hosts with non shared volumes. Volumes are not assigned through hostgroup.

  • 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 delete --api-token
    Delete API Token for current user

  • pureadmin create testuser --role storage_admin
    Create user testuser with storage_admin role. Possible roles are readonly, ops_admin, storage_admin, array_admin

  • 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

  • pureadmin setattr testuser --password
    Change the password for the user testuser

  • pureadmin create testuser --api-token
    Generate an API token for the user testuser

  • pureadmin delete testuser --api-token
    Delete API Token for user testuser

  • pureadmin delete testuser
    Delete user testuser from Flash Array

  • pureadmin create testuser --api-token --timeout 2h
    Create API Token for testuser valid for 2 hours

  • pureadmin reset testuser --lockout
    Unlock locked user testuser

  • 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 --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

  • pureaudit list --filter 'user = "root"'
    Display the list of audit records for the root user

  • purehgroup setattr MY-HOSTS --hostlist ""
    Remove all the hosts from hostgroup MY-HOSTS

  • purepod create MYPOD001
    Create a POD called MYPOD001

  • purepod create MYPOD001 MYPOD002
    Create PODs named MYPOD001 and MYPOD002

  • purepod destroy MYPOD001
    Destroy or delete POD MYPOD001. The POD must be empty and unstretched to destroy. POD will not be destructed immediately, but placed under 24hr eradication pending period.

  • purepod destroy MYPOD001 MYPOD002
    Destroy or delete PODs MYPOD001 MYPOD002. The PODs must be empty and unstretched to destroy. PODs will not be destructed immediately, but placed under 24hr eradication pending period.

  • purepod eradicate MYPOD001 MYPOD002
    Completely delete or eradicate PODs MYPOD001 MYPOD002. The PODs will not recover after this.

  • purepod eradicate MYPOD001
    Completely delete or eradicate POD MYPOD001. The POD will not recover after this.

  • purepod rename MYPOD001 YOURPOD001
    Change the name of POD from MYPOD001 to YOURPOD001

  • purepod add --array PFAX70-REMOTE MYPOD001
    Add the remote array PFAX70-REMOTE to the POD MYPOD001. This will stretch the POD and volume data inside the POD synchronously replicated between two arrays. The arrays in a stretched POD are considered as peers, there is no concept of source and target. Volumes within the POD will be visible in each arrays with same serial numbers.

  • purepod remove --array PFAX70-REMOTE MYPOD001
    Remove the remote array PFAX70-REMOTE from the POD MYPOD001. This will unstretch the POD and volume data inside the POD no longer synchronously replicated between two arrays. Volumes within the POD will be only visible in local array.

  • purepod recover MYPOD001
    Recover MYPOD001 which is destroyed earlier.

  • purepod listobj --type array MYPOD001
    List all the arrays included in MYPOD001

  • purepod listobj --type vol MYPOD001
    List all the volumes included in MYPOD001

  • purepod list
    List all the PODs in the Pure Flash array. This will shows the arrays in POD and status of each.

  • purepod list MYPOD001
    List the detail of POD MYPOD001

  • purepod list --pending
    List all the PODs including destroyed, but not eradicated

  • purepod list --pending-only
    List only the PODs which are destroyed, but not eradicated

  • purevol create --size 1G MYPOD001::MY_VOL_001
    Create a volume of 1GB size and include it in MYPOD001.

  • purehost list MY-SERVER-001
    Display the details of Host MY-SERVER-001

  • purehost list MY-SERVER-001 --connect
    List all the volumes connected to Host MY-SERVER-001

  • purehost list MY-SERVER*
    Display the details of all the Hosts those name start with MY-SERVER

  • purehost list --filter "wwn='1000000000000003'"
    Display the host with WWN 1000000000000003 as a member

  • purehgroup list --filter "host_list='MY-SERVER-001'"
    Display the Host Group where Host MY-SERVER-001 is a member