facebooktwitterskypeRSS Feed
telephone: (920) 215-1842
facsimile: (866) 456-2115

How to configure Openfiler v2.3 iSCSI Storage with VMware ESXi v4

email

VMware

Until recently I had been running my ESX VM’s on local raid disk. This is mostly due to not having enough time to get some shared storage up and running.

I however was determined to get something up and running for my ESX lab so that I can play around with some of ESX’s more powerful, and interesting, features such as DRS, HA and VMotion.

As with most of you money is a serious consideration so as I am not in a position to implement a fibre attached SAN solution – though this would be nice. The next best option is iSCSI. I am running both VMware ESXi 3.5 and ESXi 4.0 in my lab and both provide iSCSI functionality by default to connect through to an iSCSI target.

There are a handful of good free (free is good) iSCSI software that can be downloaded. Some are standalone installs, others come in the form of virtual appliances and some both.

Here is a list of those that I know of (there will no doubt be many more):

I decided to give OpenFiler a go – as I’d heard good things about the latest release, v2.3. Here’s a link to a really good document on the OpenFiler site that details the underlying architecture.

The download link to OpenFiler can be found here.

As you can see there are many different downloads available. I decided to install it on old AMD Athlon(tm) XP 2000+ PC I had lying about. This server has 1GB of memory, Single AMD 1.672GHz CPU and a single 10/100 NIC all of which are more than adequate for running OpenFiler. I downloaded and installed the x86 version. Openfiler does have a 64 bit version available.

I then burnt the ISO to CD and installed OpenFiler using the great graphical step by step installation guide provided on their web site.

Additional instructions for my needs Instructions to install Openfiler to a USB Flash Drive.

Once you have OpenFiler installed you can then access a web based management console which allows you to configure your new OpenFiler installation.

Opening a web browser and pointing it to the IP address (ie: https://<IP of OpenFiler>:446> of the OpenFiler server you should be presented with a logon screen like that below (love the fat Linux penguin).

Openfiler NSA (32-bit PAE) 2.3

Openfiler NSA (32-bit PAE) 2.3

At the prompt enter ‘openfiler’ for the ‘Username’ and ‘password’ for the password. These details can be changed once you’ve successfully logged onto the management portal along with the ability to create additional accounts and groups.

Step 1 – Network Access Configuration:

The first thing to do is set up the ‘Network Access Configuration’. This is the host or subnet (depending on how granular you want the access to be) you wish to provide access from. Select the ‘System’ tab and from the ‘Network Access Configuration’ section at the bottom of the page enter in either the IP from which you wish to access the OpenFiler from or enter in a whole subnet from which the Open filer will accept traffic from.

As I am running a secure lab environment I am just going to enter in the whole subnet for ease. You may want to be a little more granular if using this in a production or non-secure environment.

Make sure that the ‘Type’ is set to ‘Share’.

Step 1 - Network Configuration

Step 1 – Network Configuration

Volumes – Important Information (for the clarity of mind).

Before we go any further I just want to point out some potential confusion that can arise when creating, assigning and configuring the various ‘Volume’ parameters within Openfiler. There are 3 volume items we’ll be dealing with in the next few steps. I personally found this a little confusing at first so thought I’d try and throw down some clarification around this area:

  1. Physical Volume – Assigning space on a physical disk for use in a Volume Group.
  2. Volume Group – Contains Physical Volumes from which a Logical Volume will be created.
  3. Logical Volume (LUN) – This is what is presented through to a server (eg: ESX).

Now with that out of the way… on with the show!

Follow these steps in order to configure your Openfiler SAN and present it through to VMware ESX/ESXi.

Step 2 – Create a New Physical Volume:

We need to create a physical volume which we will then present through to a Volume Group. To do this select ‘Block Devices’ from the ‘Volumes section’ menu.

Step 2 - Create Physical Volume

Step 2.a – Create Physical Volume

Under ‘Edit Disk’ select the hard disk you want to create this new physical volume.

Select “create new physical volumes“.

Scroll to the bottom of the screen and you will see the available spare space on this disk along with some other parameters. If you are not intending to create a RAID set for your physical volume then select ‘Physical volume’ as your partition type and select the ‘Mode’ as ‘Primary’.

Adjust the start and end cylinders to determine the size of physical volume and when satisfied press the ‘Create’ button.

Step 2.b - Create Partition

Step 2.b – Create Partition

You will then be shown a summary of the partitions on this disk. Notice that the ‘Physical Volume’ I just created appears on the list (bottom).

Step 2.c - Create Physical Volume

Step 2.c – Create Physical Volume

Step 3 – Create a New Volume Group:

Next we want to create a new ‘Volume Groups’ for the ‘Physical Volume’ we created to reside in. Click on the ‘Volumes’ tab and then select ‘Volume Groups’ from the ‘Volume section’ menu on the right hand side menu.

Enter in a ‘Volume group name’ and select (check box) the physical volume to which you wish to associate the Volume Group. Then press ‘Add Volume group’

Step 3.a - Create Volume Group

Step 3.a – Create Volume Group

You should now be presented with a new Volume Group that looks like this:

Step 3.b - Create Volume Group

Step 3.b – Create Volume Group

Step 4 – Create a Volume:

We now want to create a ‘Volume’. Click on ‘Add volume’ from the right hand ‘Volumes section’ menu.

Step 4.a - Create Volume

Step 4.a – Create Volume

Now select the ‘Volume Groups’ you just created and press the ‘Change’ button. You will now be presented with the following screen where you determine the size of the ‘Volume’ your going to create within your ‘Volume Groups’.

For this example I’m going to create a ‘Volume’ that occupies the entire space of the ‘Volume Group’. Enter in the ‘Volume Name’ and determine the size by either keying in the required space or using the slider bar. Then for the ‘Filesystem/Volume type’ select ‘iSCSI’. This lasts part is important to all of this working so make sure it is set correctly (ie: iSCSI)!

Step 4.b - Create Volume

Step 4.b – Create Volume

When your happy with your settings press the ‘Create’ button.

Once the ‘Volume’ is created you will be greeted with a screen with a nice big green coloured pie chart in it which is indicating the amount of the ‘Volume Group’ that the volume has consumed. Which in this example is all of it.

Step 4 - Create Volume

Step 4 – Create Volume

This is now everything to do with creating a volume completed. We now want to enable the connectivity side of things (ie: allowing other PCs/Servers to connect to the OpenFiler SAN).

Step 5 – Enable the iSCSI Target Service:

Click on the ‘Services’ tab of the main window.

Next click on the ‘Services’ tab and enable the ‘iSCSI target server’ (see below). By default it is set to ‘Disabled’. For connecting the OpenFiler SAN through to an VMware ESX/ESXi host we don’t need any of the other services enabling.

Step 5 - Enable iSCSI

Step 5 – Enable iSCSI

Step 6 – Add an iSCSI Target:

Returning to the ‘Volumes’ section of the OpenFiler web interface select ‘iSCSI Targets’ from the ‘Volumes section’ menu on the right hand side of the screen.

We first want to create a new iSCSI target and do by select the first sub-tab called ‘Target Configuration’ in the ‘iSCSI Targets’ section. I personally keep the default ‘Target IQN’ generated by OpenFiler though you can alter it at this stage if your want. Now press the ‘Add’ button.

Step6 - Add iSCSI Target

Step6 – Add iSCSI Target

You will now be given a screen with a summary of the settings for the new iSCSI Target.

Step 7 – Map the LUN:

Now select the ‘LUN Mapping’ tab and click on the ‘Map’ button. There are no other settings that need changing.

Step 7 - Map LUN

Step 7 – Map LUN

Step 8 – Allow access to the iSCSI Target:

Select the ‘Network ACL’ tab and from the ‘Access’ drop down list box select ‘Allow’ (Note: it is set to ‘Deny’ by default) and then press the ‘Update’ button. This allows the IP range we defined in step 1 access to the iSCSI Target we just created.

Step 8 - Allow iSCSI

Step 8 – Allow iSCSI

You may have noticed the next menu tab which is called ‘CHAP Authentication’. In this section you would specify a logon name and password with incoming access to this iSCSI target. I am not worrying about configuring this as it is just a temporary set up for my test lab. Though if you are think about setting something up which will be a little more permanent then I’d definitely recommend enabling CHAP authentication. This’ll need enabling and these credentials specifying on the ESX side of things – but is very easy to do.

Open Filer Configuration Stage Finished!

This is now a basic OpenFiler configuration up and running with a LUN ready to be added to ESX.

IMPORTANT NOTE: If you are ever thinking of implementing OpenFiler for use with ESX in a production environment then it is highly recommended to keep the iSCSI network separate (for security and performance) from all other general type traffic and to apply CHAP’s encryption. One for general network traffic and the other for the iSCSI traffic.

Information on using Openfile with ESX/ESXi: VMware ESXi iSCSI Configuration Guide

Related posts:

  1. Install Openfiler to boot off USB Flash Drive
  2. Reduce the size of VMware VMDK files
  3. VMware vSphere on Windows 7
  4. Nagios – Server And Network Monitoring

Post a Comment

Do you have a question or comment about this post. Please share! Your email address will not be published. Required fields are marked *

*