A nice query that maps SAN storage back to it's SAN switches.
SELECT
s.name,
GROUP_CONCAT(DISTINCT sw.name) AS 'Connected Switches'
FROM storage AS s
JOIN storage_port AS sp ON sp.storageId = s.id
JOIN port_connectivity AS p ON p.connectedWwn = sp.wwn
JOIN switch_port AS swp ON swp.wwn = p.wwn
JOIN switch AS sw ON sw.id = swp.switchId
GROUP BY s.id
Comments
Post a Comment