Intro:
It has been a while since I made a blog post. I have been busy playing with some new toys š and haven’t had a chance to update the content on this site. In this article I will build upon my previous ZFS post and will configure iSCSI using Napp-it so that we can connect an ESXi Host.
iSCSI Configuration:
We will use Comstar to configure iSCSI on our server. There is a couple of components that have to be created before we can connect to this server using iSCSI. The first one being a LU(Logical Unit) which is what the iSCSI protocol will used to address the storage that we will allocate on the server. Once we have the LU created we need to create a Target and Target Group. A target will allow the initiator or client to connect to it and send SCSI commands. We associate targets with target groups and associate a View to a target group. A view is associated with a LU and target group so that we restrict the logical units that can be seen by a client connecting to a target. If we have multiple targets in a target group then all member targets will be able to see the logical units associated with this target group via a View. The drawing below demonstrates this:
In the example above PC1 will be able to see both LU 1 and LU 2 since the target that it connects to is associated with a target group that has two views connecting it to two Logical Units.
If you are using OpenIndiana with Napp-it then you want to head over to the Comstar tab and create a logical unit. I will create a thin provisioned logical unit since I don’t want to allocate all the space to this LU.
The creation of a LU is very simple and requires an existing ZFS folder and Size.
Hit submit once you are done creating the LU. Note: because we created a thin provisioned file based LU then we can always move this around to a different location or grow the size if we need to.
With the LU configured and in place we can now configure the iSCSI target. The target will have a name and alias which you can choose to be whatever you want. Note that they do have recommendations for what you should use e.g. if your LU is called ESXi then your target should be called T-ESXI and your target group can be TG-ESXI. I forgot to follow a convention when initially setting this up but fixed it later on.
After hitting submit we are greeted with the following error:
This is because we don’t have the service running and we can do so using the following command:
We can then check the status information of the service using the following command. We can see that it is currently online.
Going back to the target creation screen and hitting submit will no longer yield any errors.
With a LU and Target created we will now create a target group. The target group will allow us to add member targets which we will use to add the target we created above to.
Once the target group has been created we can then add members.
Success
The last step here is to add a view and tie in the LU to the view and connect it to the target group that we created above.
You should be able to navigate to the main Comstar page and view the results of the steps taken above. This will show us the LU, Targets, Target Groups, and view.
ESXi Configuration:
I have gone ahead and already created a software adapter on the ESXi host that I will be using as the iSCSI initiator. Once you have that created adding a target is very simple. If you are using the vSphere Web GUI to manage your hosts then all you have to do is navigate to Manage–>Storage–>Storage adapters–>Targets–>Dynamic Discovery–>Add
Adding a target is done via IP address and it is very simple.
We will rescan once we are done adding the target.
Success:
Note that my storage server has two NICs with each one having a different IP which provides some redundancy and load balancing capabilities. This is why the Target above has two different IP addresses on the same port but these are all the same unit.
This concludes the iSCSI configuration using Napp-it. I have a couple of more articles that I will be writing in the future based on this platform as well as on pfSense. I hope that this was useful and thank you for taking your time to read this article.
No Responses to “ZFS iSCSI Configuration”
Trackbacks/Pingbacks