What Volume is Connected to What Host?

There was a Pure1 Community forum question asking how to identify what volume is connected to what host?

Here are some simple scripts to display with no need to go to the Pure Storage FlashArray web management GUI.

Hosts to Volumes

$FA New-PfaArray -EndPoint 10.21.8.17 -Credentials(Get-Credential) -IgnoreCertificateError
$PureHosts Get-PfaHosts -Array $FA
ForEach ($PureHost in $PureHosts) {
  Get-PfaHostVolumeConnections -Array $FA -Name $PureHost.Name
}

Host Groups to Volumes

$FA New-PfaArray -EndPoint 10.21.8.17 -Credentials(Get-Credential) -IgnoreCertificateError
$PureHostGroups Get-PfaHostGroups -Array $FA
ForEach ($PureHostGroup in $PureHostGroups) {
  Get-PfaHostGroupVolumeConnections -Array $FA -HostGroupName $PureHostGroup.Name
}

Download Get-PfaConnections.ps1 script from GitHub (barkz/PurePowerShellGuy).

Cheers,
Barkz

2 comments
    • Glad you found the script useful. Items in the “recycle bin” are referred to as Pending Deletes. There are two ways of achieve what you are asking:
      (1) There is a parameter on the Get-PfaVolumes cmdlet -IncludePendingDeletes
      (2) Use cmdlet Get-PfaPendingDeleteVolumes

      Use Get-Help -examples to see how to use them.

      Cheers,
      Barkz

Add Comment

Required fields are marked *. Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">