Hi Lukas,
I think an efficent method would be to query the OCUM database based on a the cluster and vserver. Something like...
SELECT
cluster.NAME AS 'cluster_name',
vserver.NAME AS 'vserver_name',
export_policy.NAME AS 'policy_name',
volume.NAME AS 'volume_name',
qtree.NAME AS 'qtree_name'
FROM
netapp_model_view.export_policy,
netapp_model_view.volume,
netapp_model_view.qtree,
netapp_model_view.vserver,
netapp_model_view.cluster
WHERE
vserver.clusterId = cluster.objid
AND
volume.vserverId = vserver.objid
AND
qtree.volumeId = volume.objid
AND
qtree.vserverId = vserver.objid
AND
volume.exportPolicyId = export_policy.objid
AND
qtree.exportPolicyId = export_policy.objid
AND
vserver.NAME = 'vserver2'
AND
cluster.NAME = 'cluster1'
To ensure that gives you the correct results in your environment cross check the results with the CLI output of:
volume show -vserver <%vserver_name%> -fields policy
qtree show -vserver <%vserver_name%> -fields export-policy
Once you've determined the query provide the correct results your looking for it's just a matter of comparing the export policies that exist on the vserver with the ones that are assigned to volumes or qtrees
/Matt
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.