Hi Luc ,
i have 6 datastores that i need to add to a cluster of 6 esxi hosts.
are following two commands sufficient to add VMFS_Datastore_1’ to enitrecluster .
New-Datastore -VMHost "esxi1" -Name ‘VMFS_Datastore_1’ -Path naa.60000xxxxxxxxxxxxxxxxx36 -vmfs
and then rescan all esxi in cluster to get vmfs_datastore_1 mounted to all 6 esxi in cluster
Get-Cluster -name “YourClusterName” | Get-VMhost | Get-VMHostStorage –RescanAllHBA
Instead of RescanHba I think you need a RescanVmf
Get-Cluster -name “YourClusterName” | Get-VMhost | Get-VMHostStorage -RescanVmfs
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
but this will add datastore to all 6 esxihosts .is that correct ?
From my experience, when the LUN is shared, creating it on one ESXi node, it will become visible on all other ESXi nodes in the cluster shortly after that.
I don't even think you need to force the scan
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
i did it the other day using vsphere client and i had to do rescan on other esxi hosts.
however i wil check it again .