Oracle Database Volume Tagging with Purity 6.0

One of the Purity 6.0 features I have most eagerly been awaiting is the ability to tag Pure volumes and snapshots. Volume tagging provides a great way of providing additional database and application metadata to FlashArray Volumes to provide application and database aware reporting.

In this Blog post I am going to demonstrate how we can use Pure Storage FlashArray tagging feature to store an Oracle database name on a volume, which I will then use within a database storage space usage report.

Before we start, Purity 6.0 tagging introduces a few new terms which we need to become familiar with tag, namespace, key and value these are used to manage data stored as key value pairs. Note, if you do not specify a namespace it will use the ‘default‘ namespace, however in my examples I will be using a dedicated namespace called ‘Oracle‘.

Command Line Interface (CLI)

From the CLI we can tag, untag and list tags using the new purevol options mention above.

Tag Database Volume

pureuser@se-EMEA-EBC-FAm20-a> purevol tag z-oracle-dr-u02 --key dbName --value devslob --namespace Oracle
Name             Key     Value    Namespace  Copyable
z-oracle-dr-u02  dbName  devslob  Oracle     True  

UnTag Database Volume

pureuser@se-EMEA-EBC-FAm20-a> purevol untag z-oracle-u01 --key dbName --namespace Oracle 

List Database Volumes using Tag

pureuser@se-EMEA-EBC-FAm20-a> purevol list --tags --namespace Oracle
Name             Key     Value    Namespace  Copyable
z-oracle-dr-u02  dbName  devslob  Oracle     True    
z-oracle-dr-u03  dbName  devslob  Oracle     True    
z-oracle1-u02    dbName  oraslob  Oracle     True    
z-oracle1-u03    dbName  oraslob  Oracle     True    
z-oracle2-u02    dbName  devslob  Oracle     True    
z-oracle2-u03    dbName  devslob  Oracle     True    
z-oracle3-u02    dbName  devslob  Oracle     True    
z-oracle3-u03    dbName  devslob  Oracle     True    
z-oracle4-u02    dbName  devslob  Oracle     True    
z-oracle4-u03    dbName  devslob  Oracle     True    
z-oracle5-u02    dbName  devslob  Oracle     True    
z-oracle5-u03    dbName  devslob  Oracle     True    
z-oracle6-u02    dbName  devslob  Oracle     True    
z-oracle6-u03    dbName  devslob  Oracle     True    
z-oracle7-u02    dbName  devslob  Oracle     True    
z-oracle7-u03    dbName  devslob  Oracle     True  

Ansible Module

For Purity 6.0 a new Ansible module called ‘purefa_volume_tags’ has been developed and added to the Pure Ansible Collection which you can download from the Ansible Galaxy using

$ ansible-galaxy collection install purestorage.flasharray

If you follow my Blog you will already know I am a big Ansible fan, so as you would expect I have written an Ansible yaml file to automate the tagging of my database volumes which I have included in an updated version of my ORCA (Oracle Rapid Clone Automation) Ansible playbook.

Below is the example Ansible YAML file I have used to store the target Oracle database name on my FlashArray volumes.

Pure purefa_volume_tags Ansible module
Ansible JSON output

Using Pure REST API

Whilst I am developing Ansible and Python scripts I often use Postman to check REST format and validate results.

Below is the REST command I used to check my database volume tags have been updated correctly.

https://10.225.112.80/api/1.19/volume?filter=key='dbName'&tags=true&namespace=Oracle
Pure REST API

I have filtered the results to only return volumes which have a tag of dbName’ set within theOracle’ namespace.

Reporting Database Space Usage using Python

Finally, below is a screenshot on my new Python script which provides a simple database storage space usage report using my newly tagged database volumes.

Python Database Storage Space Usage Report

[twitter-follow screen_name=’RonEkins’ show_count=’yes’]

One thought on “Oracle Database Volume Tagging with Purity 6.0

Add yours

Leave a Reply

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: