FreeNAS is working a bit differently than Openfiler when it comes to configuring iSCSI connection to ESXi host. When I finished building my homelab recently, I at first tested several distributions but finally sticked with FreeNAS which I think has the coolest user interface, and which can be up and running in less than 10 minutes. FreeNAS 8 for iSCSI and connect to ESX (i) . There is an iSCSI configuration which works a bit differently than what I use to experiment with Openfiler. So if you're new to FreeNAS or Learning ESX(i) and if you have experienced a bit in your homelab and installed a FreeNAS 8 with RaidZ spindle you might want to read on.
I'll try to show you how I achieved this iSCSI configuration on my homemade NAS box running Intel Atom 1.6GHZ double core CPU. At first after creating RAID Z volume, which you could see in my previous article, I went the and created NFS share.
For iSCSI there are different configuration possibilities in FreeNAS 8. If you're have some individual disks or(and) RaidZ spindle. If you're having an individual disks like I do, (I have 2 individual SSD's on 2 SATA ports) you can export the whole disk as an iSCSI disk, and so you will create a device extent. But you can't do it for ZFS pool. You have to create a file and then export the file.
On the FreeNAS website, you can see that the file extent is slower than device extent.
A quick quote from FreeNAS documentation:
A device extent allows a raw partition (volume) to be exported via iSCSI. The advantage of device extent is that they are faster than file extents. The disadvantage is that the entire volume is exported. If you only want to share a portion of a volume using iSCSI, you will need to create a file extent instead.
A file extent allows you to export a portion of a volume. When creating a file extent, you specify a file name that iSCSI clients will have access to (similar in concept to a mount point) and the maximum size of that file (storage area). The advantage of file extents is that you can create multiple exports per volume. The disadvantage is that they are slower than device extents.
This makes me think, in my case, I better configure my individual SSD's as an iSCSI targets and the raid Z volume as an NFS …. -:) to get the most out of my SSD's and use the RaidZ spindle for more/less some storage, since those 4 SATA drives with 7200 RPM won't deliver much IOPS anyway.
Ok Let's go and configure one disk as an iSCSI Target. Not so difficult.
01. Portal group creation.
Go to the Portals > Add Portal.
02. iSCSI initiator.
DC Scope for VMware vSphere – optimization, capacity planning, and cost management. Download FREE Trial Here.
- Tracks the performance of VMs with a summary view of the resources and metrics in degradation.
- Easily improve the performance of your infrastructure.
- DC Scope is affordably priced per VM.
Go to the menu Initiators > Add Initiator.
The next step is to create an iSCSI target.
03. Create an iSCSI Target.
Menu Targets > Add Target.
Once the target created, you must create an extent. As I mentioned before, the device extent is apparently faster, so I go for it and create a device extent. The downside is that the whole disk is exported. Does not really matter in my case, since the disks size is only 128 Gigs.
04. Device Extent.
To add a device extent, go to Services > ISCSI > Device Extents > Add Device Extent
In the example below I'm creating a device extent for the whole SSD which has got a 128 Gigs of total storage capacity.
05. Target/Extent Association.
After the Extent created, the next step is the Target-Extent association. Once this done, one last step is to activate the iSCSI service.
06.Activate the iSCSI service.
The iSCSI service can be activated in this menu.
07. Connection from the VMware ESXi Server.
That's it for the FreeNAS part, concerning that single SSD disk. The next step are on the VMware vSphere console. Connect to your individual ESX(i) server or through vCenter. This part is actually the same as described in the Openfiler's configuration.
Go to the Configuration >Storage Adapters and enable the iSCSI storage Adapter first.
Then Enter the IP adress of your NAS device – it's 10.10.8.10 in my case – as on the image below…
Once validated, you'll get a prompt to rescan your iSCSI adapters. You can do so. You should be able to see the iSCSI Disk as on the image below.
08. The last step is to create a Datastore through the VMware vSphere Client.
Go to the Storage Menu > Add Storage > Choose Disk/Lun, create a new partition and format the newly created partition with VMSF file system.
You should see the newly created Datastore in the VMware vSphere Client's user interface.
This article is part of the Home made Do It Yourself NAS series.
Last note: I was able to connect both single disks with “device extent” configuration and being exported as different targets, but I did not manage to Add the RaidZ volume At the Same time. So I went and shared that volume as an NFS share….
- How to build a low cost NAS for VMware Lab – introduction
- How to build low cost shared storage for vSphere lab – assembling the parts
- VMware Home Lab: building NAS at home to keep the costs down – installing FreeNAS
- Performance tests with FreeNAS 7.2 in my homelab
- Installation Openfiler 2.99 and configuring NFS share
- Installing FreeNAS 8 and taking it for a spin
- My homelab – The Network design with Cisco SG 300 – a Layer 3 switch for €199.
- Video of my VMware vSphere HomeLAB
- How to configure FreeNAS 8 for iSCSI and connect to ESX(i) – this post
- Haswell ESXi Whitebox
You can also find some Free Whitepapers to download on my Free Resources page.