23
Juin
OneView – Lister en PowerShell Les WWNN et WWPN de vos Ports Fiber Channel
Comments
Après l’installation d’un nouveau serveur, il peut être nécessaire de transmettre à l’équipe stockage les wwpn (world wide port name) de ses ports fiber channel pour le zoning.
En powershell , on peut récupérer ces informations en interrogeant ainsi l’appliance OneView.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
. $hostname="monOneView" $user="monIdentifiant" $motDePasse="monPassword" Connect-HPOVMgmt -Hostname $hostname -user $user -password $motDePasse $report = @() Get-HPOVServerProfile | %{ $myProfileserver= $_ $myNameServer=$_.name $myConnections=$myProfileserver.connectionSettings.connections foreach($myconnection in $myConnections){ if($myConnection.functionType -eq "FibreChannel"){ $row="" | Select NameServer,name,Type,wwnn,wwpn,status,portId $row.NameServer=$myNameServer $row.Type=$myConnection.functionType $row.wwnn=$myConnection.wwnn $row.wwpn=$myConnection.wwpn $row.status=$myConnection.Status $row.portId=$myConnection.portId $connectionUri=Send-HPOVRequest -uri $myConnection.networkUri $row.name=$connectionUri.name $report += $row } } } $report |FT -AutoSize Disconnect-HPOVMgmt . |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
. NameServer name Type wwnn wwpn status portId ---------- ---- ---- ---- ---- ------ ------ mySrv1 FabricA FibreChannel 10:00:11:aa:bb:20:11:31 10:00:11:aa:bb:20:11:30 OK Flb 1:1-b mySrv1 FabricB FibreChannel 10:00:11:aa:bb:20:11:33 10:00:11:aa:bb:20:11:32 OK Flb 1:2-b mySrv2 FabricA FibreChannel 10:00:11:aa:bb:20:11:95 10:00:11:aa:bb:20:11:94 OK Flb 1:1-b mySrv2 FabricB FibreChannel 10:00:11:aa:bb:20:11:97 10:00:11:aa:bb:20:11:96 OK Flb 1:2-b mySrv3 FabricA FibreChannel 10:00:11:aa:bb:20:11:a1 10:00:11:aa:bb:20:11:a0 OK Flb 1:1-b mySrv3 FabricB FibreChannel 10:00:11:aa:bb:20:11:a3 10:00:11:aa:bb:20:11:a2 OK Flb 1:2-b . |
A lire :