Tuesday, 14 April 2009

Using OpenFiler for iSCSI target Server

Well I came across OpenFiler a while ago and have used the iSCSI component of it on and off for testing various setup's and configurations, saying that, it is a very nice open source storage management server solution. It is free to download and use, but the manuals/documentation is a purchase only item as is support, well they've got to make some money somehow… and there are forums where you can get some help.

It is capable of a range of network storage types, including NFS, SAMBA/CIFS, HTTP/DAV, FTP and RSYNC at the file level, and at block level, storage can be exported via iSCSI as I've just mentioned and Fiber Channel.

I have only really used the iSCSI facility for my own purposes so far as I was after a cost effective SAN that I could use for testing purposes, here I've listed the procedure that I have used to initiate iSCSI targets on OpenFiler so that I can connect a Windows Server to it with the iSCSI initiator.

So enough with the intro as I would think your itching to get on with the howto.

Configuring Openfiler for iSCSI

FIrst off you will need a system you can use for a file server and install OpenFiler on to it, I’m not going to go into installing the OS in this blog perhaps in the future, but if you need a howto now you can follow one on OpenFiler’s own pages here.

So after installing OpenFiler using a static IP you can access it via a web browser at https://[your IP number]:446 where you will be presented with a login page.

Openfiler Storage Control Center - 1
Use 'openfiler' as the user and 'password' as the password, this will log you in to the administration section to set up the server.

Status_ System Status - 2

Okay the first thing you’ll want to do is change the admin password so… navigate to the accounts section.

Accounts _ Authentication - 3

On the right hand side of the page you will see two navigation boxes, in the one named Account Section choose the Admin Password and enter the current password and the new password you want to change to on the resultant page.

Accounts _ Admin Password -  4

Next we want to enable the iSCSI Target service, so go to the services section and click the enable link to activate it.
(you may be prompted to login again due to the password change).

Services Section - 5

Okay next go to the Volumes section, and as we do not have any existing active volumes yet you will need to create one. There is a link to browse to in the Create a new volume group heading, select it.

Volumes _ Volume Groups - 6

Select the drive you want to use.

Volumes _ Block Devices - 7

In my case I will use the /dev/hdb drive.

Block Devices _ Edit Partitions - 8

I'm going to use all the drive, all I need to use are the default settings for all, but change the partition type to 'Physical volume', and hit create.

Block Devices _ Edit Partitions - 9

Now we go back to the Volume Groups to create a new volume group.

Volumes _ Volume Groups - 10

Volumes _ Volume Groups - 11

Now we add a volume to the group, give your volume a name and a description then select the size you want, choose iSCSI for the filesystem/volume type and click create.

Volumes _ Add Volume - 12

We now need to create an iSCSI target so, still in the Volumes section select iSCSI targets from the volume section menu on the right. You should be in Target Configuration, there will probably not be any assigned at present. You can edit the last part of the Target IQN to something more meaningful, e.g. iqn.2006-01.com.openfiler:tsn.fa63004c33cc to iqn.2006-01.com.openfiler:tsn.backupvol. to create a new iSCSI target simply click the add button.

Volumes _ iSCSI Targets - 13

Okay now we need to map a LUN to the Target, go to the LUN Mapping section, you will see that there are no LUN's mapped and a list of available LUN's.

Volumes _ iSCSI Targets - 14

Click map making sure that blockio is selected for Transfer Mode.

Volumes _ iSCSI Targets - 15

Now we go back to the System page and setup Network Access Configuration, so that the client machine can access the openfiler server. in order for the iSCSI access to work you need to enter the clients IP and a give it the netmask of, click update.

System _ Network Setup - 16

Now back to the Volumes page and select the iSCSI Targets section again. go to Network ACL page and you should see the system you have just entered into the Network Access Configuration, change the Access dropdown from Deny to Allow and click the update button.

Volumes _ iSCSI Targets - 17

You now have an iSCSI target setup for the machine whose IP number you used.

Attaching to the ISCSI target from Windows

To connect to the iSCSI target that you have created you will need to use the iSCSI Initiator for Windows, this is supplied as part of Vista & 2008 Server.

If you want to connect 2003 Server you can download the Initiator from Microsoft Downloads here. It is also compatible with XP and 2000.

So the iSCSI Initiator is located in the Control Panel.

2k8-control panel

Start the Initiator and select the Discovery tab.

2k8-iscsi Initiator- Discovery

Now click the Add Portal button to connect the system to the Target Portal, that is the OpenFiler IP and the default iSCSI port number of 3260.

2k8-add target portal

Now select the Targets tab and you should see the the targets that are available to you, if you don’t, try doing a refresh a couple of times first.

Select the target and click the Log on button.

2k8-iscsi Initiator- target

Here you can setup the target to automatically be restored at start up, useful if you are using the connection for hosting VM’s in a failsafe cluster configuration or any other use involving a permanent connection.

2k8-log on to target

You should now have the target connected, iSCSI will show up as another hard drive, you can view it under Disk Management, though initially it will show up as offline.

2k8-disk management

You need to bring the disk online and assign a drive letter to it, after this you can format it in the usual way, and to all intents an purposes as far as Windows is concerned you now have another physical hard drive attached to your system and can use it as one.

Hope this little blogged howto will help someone out there in some way, I’ll endeavour to bring some more configuration help in other aspects of OpenFiler in the future.


  1. Hi ,

    Thanks for your post.This post very very useful for me ,when i trouble to connect a quorum dist in windows.