Hey Storage Spaces Direct fans, I have been on Vacation for the past few weeks so sorry about not having posted for a bit. In this Blog post I wanted to talk about the importance of Virtual Network Adapter Affinity. Here is a screen shot of my configuration below.


We have 2 x Mellanox CX-4 Ports one connecting to Top of Rack Switch 1 and the other to SW2.

Now what we want to do is bind SMB_1 to Ethernet 5 and SMB_2 to Ethernet 6.

One of the neat tricks that I have recently learned is how to setup Virtual Adapter Affinity to a Physical Adapter. This is important because when you design a solution with Multiple Top of Rack switches it is important to control what ports the storage SMB traffic is running over. For example, if we have two physical adapter we want two virtual adapters for storage spaces direct. One of the ports from the physical adapter goes to switch one and the other to switch two. We need to ensure that this can be done Hyper-V as well.


Here is the command that you need to run to get this job done: Set-VMNetworkAdapterTeamMapping

Here is the code below to get this done:

$Nodes = ("S2D1","S2D2")
Invoke-Command $Nodes {Get-NetAdapter -Name "Ethernet 5" | ? {Set-VMNetworkAdapterTeamMapping -VMNetworkAdapterName 'SMB_1' -ManagementOS -PhysicalNetAdapterName $_.Name}}
Invoke-Command $Nodes {Get-NetAdapter -Name "Ethernet 6" | ? {Set-VMNetworkAdapterTeamMapping -VMNetworkAdapterName 'SMB_2' -ManagementOS -PhysicalNetAdapterName $_.Name}}

Happy Learning,

Dave