{"id":306,"date":"2014-06-04T17:14:21","date_gmt":"2014-06-04T16:14:21","guid":{"rendered":"http:\/\/snakenet.eu\/blog\/?p=306"},"modified":"2016-01-29T12:11:53","modified_gmt":"2016-01-29T11:11:53","slug":"renommer-les-luns-scsi-facilement","status":"publish","type":"post","link":"https:\/\/snakenet.eu\/blog\/renommer-les-luns-scsi-facilement\/306\/","title":{"rendered":"Renommer les LUNs SCSI facilement"},"content":{"rendered":"<p>Vous voulez donner un nom sympa ? vos LUNs au lieu du naa ? rallonge?<br \/>\nAssez facile avec cette fonction :<\/p>\n<p><code>function Rename-scsilun {<br \/>\nParam([string]$naa, [string]$ScsiLunName)<br \/>\nget-vmhost | foreach {<br \/>\n$esx = Get-VMHost $_.name | Get-View<br \/>\n$storSys = Get-View $esx.ConfigManager.StorageSystem<br \/>\nGet-ScsiLun -VMHost $_.name -LUNType disk -CanonicalName $naa -ErrorAction SilentlyContinue | %{$storSys.UpdateScsiLunDisplayName($_.ExtensionData.Uuid, $ScsiLunName)}<br \/>\n}<br \/>\n}<br \/>\n<\/code><\/p>\n<p>A utiliser comme ceci :<\/p>\n<p><code>Rename-scsilun -naa naa.1234567890123456789 -ScsiLunName SAN_PRD-LUN_01<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Vous voulez donner un nom sympa ? vos LUNs au lieu du naa ? rallonge? Assez facile avec cette fonction : function Rename-scsilun { Param([string]$naa, [string]$ScsiLunName) get-vmhost | foreach { $esx = Get-VMHost $_.name | Get-View $storSys = Get-View $esx.ConfigManager.StorageSystem Get-ScsiLun -VMHost $_.name -LUNType disk -CanonicalName $naa -ErrorAction SilentlyContinue | %{$storSys.UpdateScsiLunDisplayName($_.ExtensionData.Uuid, $ScsiLunName)} } } A [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-306","post","type-post","status-publish","format-standard","hentry","category-non-classe"],"_links":{"self":[{"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/posts\/306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/comments?post=306"}],"version-history":[{"count":6,"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/posts\/306\/revisions"}],"predecessor-version":[{"id":312,"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/posts\/306\/revisions\/312"}],"wp:attachment":[{"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/media?parent=306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/categories?post=306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/snakenet.eu\/blog\/wp-json\/wp\/v2\/tags?post=306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}