Hi Michael,
Unfortunately i don't think OCUM enables you to achieve the result your customer wants however if they are using WFA...
Assuming your customer wants to ensure that all data volumes on all vservers on all clusters in their environment are always thin provisioned then here is a WFA workflow that can be scheduled on a daily basis to query the WFA database and ensure any thick provisioned volumes have the volume option of "space-guarentee" set from "volume" to "none".
Here is the powershell code:
param(
[Parameter(Mandatory=$True, HelpMessage="The name of the volume option to set")]
[String]$VolumeOptionName,
[Parameter(Mandatory=$True, HelpMessage="The value of the volume option to set")]
[String]$VolumeOptionValue,
[Parameter(Mandatory=$False, HelpMessage="The maximum number of ZAPI re-try attempts")]
[Int]$ZapiRetryCount
)
#'------------------------------------------------------------------------------
#'Create a query to select all thick provisined volumes on all clusters and vservers.
#'------------------------------------------------------------------------------
[String]$query = "SELECT cluster.primary_address AS 'primary_address', cluster.name AS 'cluster_name', vserver.name AS 'vserver_name', volume.name AS 'volume_name' FROM cm_storage.cluster, cm_storage.vserver, cm_storage.volume WHERE vserver.cluster_id = cluster.id AND volume.vserver_id = vserver.id AND volume.space_guarantee = 'volume' AND volume.junction_path <> '/';"
#'------------------------------------------------------------------------------
#'Invoke the MySQL query to select the clusters.
#'------------------------------------------------------------------------------
$results = Invoke-MySqlQuery -Query $query
Get-WFALogger -Info -Message "Invoked SQL Query`: $query"
#'------------------------------------------------------------------------------
#'Process each cluster.
#'------------------------------------------------------------------------------
[Int]$errorCount = 0
ForEach($result In $results){
Do{
[String]$clusterPrimaryAddress = $result.primary_address
[String]$clusterName = $result.cluster_name
[String]$vserverName = $result.vserver_name
[String]$volumeName = $result.volume_name
If(($clusterPrimaryAddress -ne "") -And ($clusterName -ne "") -And ($vserverName -ne "") -And ($volumeName -ne "")){
Get-WFALogger -Info -Message "Processing volume ""$volumeName"" on vserver ""$VserverName"" on cluster ""$ClusterName"" primary address ""$clusterPrimaryAddress"""
#'---------------------------------------------------------------------
#'Connect to the cluster.
#'---------------------------------------------------------------------
Get-WFALogger -Info -Message "connecting to cluster name ""$clusterName"" primary address ""$clusterPrimaryAddress"""
Connect-WfaCluster $clusterPrimaryAddress
#'---------------------------------------------------------------------
#'Create the command to set the volume option.
#'---------------------------------------------------------------------
[String]$command = "Set-NcVolOption -Name $VolumeName -Key $VolumeOptionName -Value $VolumeOptionValue -VserverContext $VserverName "
If($ZapiRetryCount){
[String]$command += " -ZapiRetryCount $ZapiRetryCount "
}
[String]$command += " -ErrorAction Stop"
#'---------------------------------------------------------------------
#'Set the volume option.
#'---------------------------------------------------------------------
Try{
Invoke-Expression -Command $command -ErrorAction Stop
Get-WFALogger -Info -Message "Executed Command`: $command"
Get-WFALogger -Info -Message "Set volume option ""$VolumeOptionName"" to ""$VolumeOptionValue"" for volume ""$VolumeName"" on vserver ""$VserverName"""
}Catch{
Get-WFALogger -Error -Message $("Failed Executing Command`: $command. Error " + $_.Exception.Message)
Get-WFALogger -Error -Message $("Failed setting volume option ""$VolumeOptionName"" to ""$VolumeOptionValue"" for volume ""$VolumeName"" on vserver ""$VserverName""")
[Int]$errorCount = $errorCount + 1
}
}
}Until($True)
}
#'------------------------------------------------------------------------------
#'Ensure an error is raised if there were any failures.
#'------------------------------------------------------------------------------
If($errorCount -ne 0){
Throw "Failed setting volume option ""$VolumeOptionName"" to ""$VolumeOptionValue"" on all volumes"
}
#'------------------------------------------------------------------------------
It leverages the WFA "Invoke-MySQL" query function to select all thick provisioned data volumes on all clusters on all vservers. EG:
#'---------------------------------------
#'Select all thick provisioned volumes on all clusters and vservers
#'---------------------------------------
SELECT
cluster.primary_address AS 'primary_address',
cluster.name AS 'cluster_name',
vserver.name AS 'vserver_name',
volume.name AS 'volume_name'
FROM
cm_storage.cluster,
cm_storage.vserver,
cm_storage.volume
WHERE
vserver.cluster_id = cluster.id
AND
volume.vserver_id = vserver.id
AND
volume.space_guarantee = 'volume'
AND
volume.junction_path <> '/';
#'---------------------------------------
Here is the example output (note it is connecting to multiple clusters and vservers to set all thick provisioned volumes to thin provisioned volumes)

You could also use this WFA workflow to set any other volume option globally in your environment...just set the input parameter values. EG

hope that helps
/matt
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.