When using Freenas in a virtualised environment you may want to seperate the VM traffic from the user traffic on the SAN. In this case you would use a switch to seperate the SAN from the main network and keep the IO traffic on a seperate subnet. If you follow the standard instructions to install Freenas in a virtual machine you with end up with a standard single interface with an address on the main user facing subnet. In order to get a back end interface to service the ESX(i) hosts requests you will need to add a second virtual network card connected to the “storage” network. In this example the main network is on the 10.0.0.x subnet and the storage network is on the 192.168.0.x subnet.
Shutdown the virtual machine and add avirtual second card. if you haven’t done already on the ESX host that you are running the SAN on – dedicate a card to the storage network and give it an IP address on that subnet (192.168). You need to add a vmkernel port on that card to facilitate this. Once the vmkernel network is available – give it a name like “Storage network” and attach the second virtual card in the freenas VM to that “Storage network” – through the network setting for the vm.
Now boot the vm and use the web interface to select the new network card, First in the device hardware option – activate the new card (should be called LE1) and then assign a static IP address on the storage network. Once you have done this check that you can ping the IP address of the cards in the ESX hosts that are on the 192.168 subnet. this assume that you have done this for each esx that willl access the SAN based targets. In essence this would just be the same step of attaching a physical network card on the esx to the switch with the SAN VM host attached to it and assigning a vmkernel port on it for ISCI access to the SAN.
The methods for activating iscsi on ESX and Esxi are fairly straightforward and once complete you are ready to configure the iscsi targets that you will create on the SAN. You will use the interface on the 10.0.0.x network to access and manage the setup of the volumes on the virtual SAN. Once done the final step is to rescan the isci storage adapter to see the SAN volumes. I’ll talk about the steps in Freenas to create the disk targets for access through ISCSI in another episode.