So the series I’ve been doing on ESXi has been getting nothing but great feedback, and I’m glad that I can share what I’ve learned over the course of the last couple years with everyone.
On episode 518 of Hak5, we show how truly easy it is to add iSCSI storage to a free deployment of ESXi.
So what is iSCSI?
In computing, iSCSI (pronounced /аɪsˈkʌzi/), is an abbreviation of Internet Small Computer System Interface, an Internet Protocol (IP)-based storage networking standard for linking data storage facilities. By carrying SCSI commands over IP networks, iSCSI is used to facilitate data transfers over intranets and to manage storage over long distances. iSCSI can be used to transmit data over local area networks (LANs), wide area networks (WANs), or the Internet and can enable location-independent data storage and retrieval. The protocol allows clients (called initiators) to send SCSI commands (CDBs) to SCSI storage devices (targets) on remote servers. It is a popular storage area network (SAN) protocol, allowing organizations to consolidate storage into data center storage arrays while providing hosts (such as database and web servers) with the illusion of locally-attached disks. Unlike traditional Fibre Channel, which requires special-purpose cabling, iSCSI can be run over long distances using existing network infrastructure.
In simpler terms, using some free software, it’s stupid easy to create a large amount of storage which is not tied to the physical adapter of the host server (in this case, the server ESXi is running on).
So what do we need?
- Functioning ESXi Installation
- Server capable of running FreeNAS
- Gigabit connectivity between ESXi server and FreeNAS
Now let’s get started. While it’s recommended to separate your iSCSI traffic from your other internet networking, for the purpose of this instruction, we’re just going to use the same IP subnet for all of our LAN and iSCSI traffic.
Our ESXi server sits at 10.10.1.55 and our newly installed FreeNAS server is located at 10.10.1.66
- Connect to your FreeNAS server through the WebGUI using your favorite browser. In the top menu select Disks, then click Management.
- Click on the plus sign in the lower right corner to add drives.
- Next to Disk, choose the drive you want to add from the drop down, and if you want enter a description for it next to Description.
- When you go back to the Disk Management screen you will be asked to confirm the addition by clicking on Apply changes, go ahead and do that now.
- From the top menu choose Services, then iSCSI Target.
- Click on the plus sign in the Extent area.
- The Bolded fields are required, so place a name in the Extent name field, leave the Type as Device, and then choose the Device you want in the dropdown.
- When you get back to the iSCSI Target page click on Apply changes.
- Click on the plus sign in the Target area.
- As before the Bolded fields are required. Here is a breakdown of the fields:
Target name: Add your own or leave the default
Flags: RW for Read/Write or RO for Read Only
Storage: Will have the extents listed that were setup, choose the one you want to use
Authorized Network: Enter the IP network that can access this drive. For us we’re going to enter 10.10.1.0 and we’ll leave the /24 as our subnet is 255.255.255.0
- Back at the iSCSI target page you need to click on Apply changes once again.
- Now place a check in the box next to Enable in the top right corner and then click Save and Restart in the bottom left.
- The iSCSI Target drive is now setup and ready for use.
Now we need to setup ESXi to connect to our newly created iSCSI target.
Start by logging into your your host by using the Vitrual Infrastructure Client.
Click on your host, and then click the configuration tab.
Click Storage adapters, and then select your VMHBA32 iSCSI storage adapter.
Click properties and configure, then check the enabled box.
Goto the dynamic discovery tab, and add your FreeNAS IP address (in this case, 10.10.1.66)
Click ok, then close, and then rescan the HBA.
At this point you should see your storage, now we need to format the new storage.
So click back to the storage option on the left.
Then click Add Storage.
Select Disk / Lun, and click next.
Select your new disk on the FreeNAS iSCSI target, and next, next, finish.
Questions? Post em in the comments!