<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Automatic peer SVM selection in WFA in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Automatic-peer-SVM-selection-in-WFA/m-p/131193#M23762</link>
    <description>&lt;P&gt;Awesome, both solutions worked like a charm - many thanks to both of you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers / Richard&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 May 2017 08:40:31 GMT</pubDate>
    <dc:creator>Richard</dc:creator>
    <dc:date>2017-05-19T08:40:31Z</dc:date>
    <item>
      <title>Automatic peer SVM selection in WFA</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Automatic-peer-SVM-selection-in-WFA/m-p/131133#M23749</link>
      <description>&lt;P&gt;I am setting up a workflow to create a volume with cascaded protection:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Primary volume $PrimaryVolumeName in $PrimaryVserver&lt;/LI&gt;&lt;LI&gt;SnapVault from primary to $VaultVolumeName in $VaultVserver&lt;/LI&gt;&lt;LI&gt;SnapMirror from vault to $MirrorVolumeName in $MirrorVserver&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I know there is a canned workflow for cascading Vault+Mirror but that has the freedom to chose destination clusters and destinations SVM:s and will create cluster/SVM peering if needed. I would like to look up the existing SVM peer relationships and only display a list of those to aviod any mistakes. The information is in the vserver_peer table in WFA but I cannot figure out how to stitch it all together in an SQL query: "give me a list of all the SVM:s that are peered with $PrimaryVserver - and when I select one SVM, show me a list of aggregates in the cluster where it resides".&amp;nbsp;Any advice?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 15:04:21 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Automatic-peer-SVM-selection-in-WFA/m-p/131133#M23749</guid>
      <dc:creator>Richard</dc:creator>
      <dc:date>2025-06-04T15:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic peer SVM selection in WFA</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Automatic-peer-SVM-selection-in-WFA/m-p/131140#M23750</link>
      <description>&lt;P&gt;Hello Richard,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used the search and define function so i first check the peer cluster of the primary cluster and then used to search the peer SVM of a primary SVM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Query to select the peer SVM of a selected Primary SVM is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SELECT&lt;BR /&gt;vserver.name,&lt;BR /&gt;cluster.primary_address AS 'cluster.primary_address'&lt;BR /&gt;FROM&lt;BR /&gt;cm_storage.cluster cluster,&lt;BR /&gt;cm_storage.vserver vserver,&lt;BR /&gt;(&lt;BR /&gt;Select&lt;BR /&gt;cm_storage.vserver_peer.peer_vserver_id as 'peer_svm_id'&lt;BR /&gt;From&lt;BR /&gt;cm_storage.vserver_peer,&lt;BR /&gt;cm_storage.vserver&lt;BR /&gt;Where&lt;BR /&gt;cm_storage.vserver_peer.vserver_id = cm_storage.vserver.id&lt;BR /&gt;And cm_storage.vserver.name = '${PrimarySVM}' ) as peersvmid&lt;BR /&gt;where&lt;BR /&gt;vserver.cluster_id = cluster.id&lt;BR /&gt;AND cluster.name = '${bkpcluster}'&lt;BR /&gt;AND vserver.is_repository IS NOT TRUE&lt;BR /&gt;AND (&lt;BR /&gt;vserver.type = 'clustear'&lt;BR /&gt;OR vserver.type = 'data'&lt;BR /&gt;)&lt;BR /&gt;AND vserver.name NOT LIKE '${bkpcluster}%'&lt;BR /&gt;and vserver.operational_state = 'running'&lt;BR /&gt;AND vserver.name NOT LIKE "%mc"&lt;BR /&gt;and vserver.id = peersvmid.peer_svm_id&lt;BR /&gt;and vserver.name not like '${PrimarySVM}'&lt;BR /&gt;ORDER BY&lt;BR /&gt;vserver.name ASC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Query to Select peer cluster of a primary cluster is:&lt;/P&gt;&lt;P&gt;SELECT&lt;BR /&gt;cluster.name, -- cluster.is_metrocluster,&lt;BR /&gt;cluster.primary_address AS 'primary_address'&lt;BR /&gt;FROM&lt;BR /&gt;cm_storage.cluster,&lt;BR /&gt;(&lt;BR /&gt;Select&lt;BR /&gt;cm_storage.cluster_peer.peer_cluster_id as 'peer_cluster_id'&lt;BR /&gt;From&lt;BR /&gt;cm_storage.cluster_peer,&lt;BR /&gt;cm_storage.cluster&lt;BR /&gt;Where&lt;BR /&gt;cm_storage.cluster_peer.primary_cluster_id = cm_storage.cluster.id&lt;BR /&gt;And (&lt;BR /&gt;cm_storage.cluster.name = '${cluster}'&lt;BR /&gt;Or cm_storage.cluster.primary_address = '${cluster}'&lt;BR /&gt;)) as peerid&lt;BR /&gt;WHERE&lt;BR /&gt;&amp;nbsp;cluster.id = peerid.peer_cluster_id&lt;BR /&gt;ORDER BY&lt;BR /&gt;name ASC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It has worked for me so far.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;,Sheel&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 11:21:18 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Automatic-peer-SVM-selection-in-WFA/m-p/131140#M23750</guid>
      <dc:creator>sheelnidhig</dc:creator>
      <dc:date>2017-05-18T11:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic peer SVM selection in WFA</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Automatic-peer-SVM-selection-in-WFA/m-p/131176#M23756</link>
      <description>&lt;P&gt;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/21379"&gt;@Richard&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks like Sheel has a workable option for you, but I figured I would throw in mine for reference. I am using this strictly for SnapMirror, but I think it will work for your purposes since the peering should be the same. If not, hopefully a little tweaking would get it there. My standard disclaimer: I am not a SQL query guru by any stretch, but at least this seems to work for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the peered cluster:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;SELECT
    dest_cluster.name AS "Destination Custer"
FROM
    cm_storage.vserver_peer,
    cm_storage.cluster src_cluster,
    cm_storage.vserver src_vserver,
    cm_storage.cluster dest_cluster,
    cm_storage.vserver dest_vserver
WHERE
    vserver_peer.peer_vserver_id = src_vserver.id
    AND vserver_peer.vserver_id = dest_vserver.id
    AND dest_vserver.cluster_id = dest_cluster.id
    AND vserver_peer.peer_state = 'peered'
    AND vserver_peer.peer_vserver_local_name = '${sourcesvm}'
    AND dest_vserver.is_repository IS NOT TRUE
    AND (
        dest_vserver.type = 'cluster'
        OR dest_vserver.type = 'data'
    )
    AND dest_vserver.admin_state='running'
GROUP BY
    dest_cluster.name ASC&lt;/PRE&gt;&lt;P&gt;For the peered SVM:&lt;/P&gt;&lt;PRE&gt;SELECT
    dest_vserver.name AS "Destination SVM"
FROM
    cm_storage.vserver_peer,
    cm_storage.cluster src_cluster,
    cm_storage.vserver src_vserver,
    cm_storage.cluster dest_cluster,
    cm_storage.vserver dest_vserver
WHERE
    vserver_peer.peer_vserver_id = src_vserver.id
    AND vserver_peer.vserver_id = dest_vserver.id
    AND vserver_peer.peer_state = 'peered'
    AND vserver_peer.peer_vserver_local_name = '${sourcesvm}'
    AND dest_vserver.is_repository IS NOT TRUE
    AND (
        dest_vserver.type = 'cluster'
        OR dest_vserver.type = 'data'
    )
    AND dest_vserver.admin_state='running'
GROUP BY
    dest_vserver.name ASC&lt;/PRE&gt;&lt;P&gt;And an aggregate selection based on those showing only what that SVM can see, which may have way more info than you need (this assumes peered cluster variable of $destcluster and peered SVM variable of $destsvm) – I normally use Search or Define steps to determine aggregates anymore:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;SELECT
    aggregate.name AS 'Aggregate Name',
    node.name AS ' Node',
    aggregate.size_mb/1048576 AS 'Total Size (TB)',
    aggregate.used_size_mb/1048576 AS 'Used Size (TB)',
    aggregate.available_size_mb/1048576 AS 'Available Size (TB)',
    IFNULL(aggregate.volume_count,
    0) AS 'Volume Count',
    REPLACE(disk_info_table.disk_type,
    ',',
    ' and ') AS 'Disk Type',
    IF (aggregate.is_hybrid IS NULL,
    'Not available',
    IF (aggregate.is_hybrid,
    'True',
    'False')) AS 'Is FlashPool'
FROM
    cm_storage.cluster,
    cm_storage.node,
    cm_storage.vserver,
    (
    SELECT
        GROUP_CONCAT(DISTINCT(disk.type)) AS disk_type,
        disk_aggr.aggregate_id AS aggr_id
    FROM
        cm_storage.disk DISK,
        cm_storage.disk_aggregate disk_aggr
    WHERE
        disk_aggr.disk_id = disk.id
    GROUP BY
        disk_aggr.aggregate_id) AS disk_info_table,
    cm_storage.aggregate
WHERE
    cluster.name = '${destcluster}'
    AND node.cluster_id = cluster.id
    AND aggregate.node_id = node.id
    AND aggregate.name NOT LIKE '%aggr0%'
    AND (
        aggregate.has_local_root IS NULL || aggregate.has_local_root = 0
    )
    AND (
        aggregate.has_partner_root IS NULL || aggregate.has_partner_root = 0
    )
    AND disk_info_table.aggr_id = aggregate.id
    AND vserver.name = '${destsvm}'
    AND (
        vserver.restricted_aggregate_count = 0 || aggregate.id IN (
            SELECT
                aggregate_id
            FROM
                cm_storage.vserver_allowed_aggregate
            WHERE
                vserver_id = vserver.id
                AND vserver.cluster_id = cluster.id
        )
    )
ORDER BY
    aggregate.name ASC,
    node.name,
    aggregate.size_mb,
    aggregate.used_size_mb,
    aggregate.available_size_mb,
    disk_info_table.disk_type&lt;/PRE&gt;&lt;P&gt;Hopefully there is some useful info in there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Matt&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 15:48:29 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Automatic-peer-SVM-selection-in-WFA/m-p/131176#M23756</guid>
      <dc:creator>MattInCO</dc:creator>
      <dc:date>2017-05-18T15:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic peer SVM selection in WFA</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Automatic-peer-SVM-selection-in-WFA/m-p/131193#M23762</link>
      <description>&lt;P&gt;Awesome, both solutions worked like a charm - many thanks to both of you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers / Richard&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 08:40:31 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Automatic-peer-SVM-selection-in-WFA/m-p/131193#M23762</guid>
      <dc:creator>Richard</dc:creator>
      <dc:date>2017-05-19T08:40:31Z</dc:date>
    </item>
  </channel>
</rss>

