feature photo

 

 Work from Anywhere

 Freedom & Empowerment

 

 All your applications, data and services

 in one place.

 

 Accessible from any device, anywhere

 

  Find out more here

 

 

 

 

Lee Wynne | May 31st, 2008 | Continued

feature photo

 

 Application Delivery & Virtual Infrastructure

 Experts. Affordable, Qualified

 and Available

 

 At the World’s most cost effective consulting rates.

 

  Available Globally, Learn more here

 

 

 

 

 

 

 

Lee Wynne | May 31st, 2008 | Continued

  • Glide through Featured Business Solutions
  • 1
  • 2
Testimonials

About the Author

author photo

Enterprise, Citrix & VMware Consultant. Technical Author, Technical Project Management, Solution Design, Integration and Delivery. I currently work for app.delivery (www.applicationdelivery.co.uk) and for Multiple Award Winning Citrix Platinum Partner, Point to Point Ltd in the UK, prior to joining Point to Point Ltd I was the European Application Delivery Manager at HJ Heinz Co Ltd. I have been lucky enough to have worked with Citrix technology since the introduction of Winframe and I started on VMware with version 2 of ESX

See All Posts by This Author

How to set up a free iSCSI or NAS storage system for VMware ESX using Openfiler

 

Everything I am about to demonstrate to you here is free. You won’t have to spend a penny on software to build this architecture, the end result here is a centralised storage system that can be used for iSCSI or NAS storage hosting to all your ESX clients to enable the use of VMotion, HA and DRS services.

 

VMware ESXi is free and can be downloaded here. Openfiler NAS/iSCSI appliance is free and can be downloaded here

 

Let us begin.

 

First of all, we will build or iSCSI or NAS device using ‘Openfiler’. You can download Openfiler from the link above, it is an easy installation (very similar to VMware ESX actually). Here are the required steps to get Openfiler up and running:

 

 

OpenFiler Installation

 

1. Begin the Installation

 

Insert the Openfiler disk into your CD/DVD-ROM drive and ensure your system is configured to boot from the CD/DVD-ROM drive. Hit the Enter key to proceed.

 

2. Boot

 

Hit the enter key to begin the graphical installation

 

openfiler1.png

openfiler2.png

 

3. Installation

 

You are now presented with a splash screen for installation. Hit Next

 

openfiler3.png

 

 

4. Keyboard Layout

 

Select the appropriate keyboard layout. Hit Next

 

openfiler4.png

 

5. Disk Partitioning

 

We are going to set this up manually. Select the ‘Manual partition with Disk Druid’.

 

We will need to create three partitions on the system to complete the installation of openfiler:

 

“/boot” - this is where the kernel will reside and the system will boot from

“swap” - this is the swap partition for memory swapping to disk

“/”- this is the system root partition where all system applications and libraries will be installed

 

Creating the /boot Partition

 

openfiler6.png

 

Click on the New button. You will be presented with a screen form with several

fields and checkboxes.

 

Enter the partition mount path “/boot” and the select the disk on which to create the

partition (ensure this is the disk that you want to install Openfiler on, and not the disk you want to present to your esx servers)

 

The following is a list of all entries required to create the boot partition:

 

1. Mount Point: /boot

2. Filesystem Type: ext3

3. Allowable Drives: As mentioned above, ensure the installation target disk is selected.

4. Size(MB): 100 (this is the size in Megabytes, allocate 100MB by entering “100″)

5. Additional Size Options: select Fixed Size from the options.

6. Force to be a primary partition: Checked (select this checkbox to force the partition to be created as a primary partition)

 

It should look like this:

 

openfiler7.png

 

Create / (root) Partition

 

Click on the New button. You will be presented with the same screen form as

previously when creating the boot partition.

 

The details are identical to what was entered for the /boot partition

except this time the Mount Point: should be “/” and the Size(MB): should be 2048MB or at a minimum 1024MB.

 

It should look like this:

 

openfiler8.png

 

Create Swap Partition

 

Proceed by creating a swap partition. Click on the New button. You will be presented with the same form as

previously when creating the boot and root partitions.

 

The details are identical to what was entered for the boot partition except this time the Mount Point: should swap. Use the drop down list to select a swap partition type.

The Size(MB): of the partition should be at least 1024MB and need not exceed 2048MB.

 

It should look like this:

 

openfiler9.png

 

 

Proceed by clicking the OK button to create the partition. You should now have a set of partitions ready for the Openfiler Operating System image to install to. Your disk partition scheme should resemble the following, detailing what ever free space you have left.

 

openfiler10.png

 

 

6. Network Configuration

 

In this section we will configure your network card (IP address etc), system hostname and DNS parameters.

 

We will need to configure at least one network interface card in order to access the Openfiler web interface and to serve data to

your ESX clients on a network. (at this stage, you can choose DHCP to configure the network address, you

can simply click Next and proceed to the next stage of the installation process).

 

To specificy an IP address and hostname, click the Edit button at the top right corner of the screen in the Network Devices section.

 

Network interface devices are designated ethX where X is a number starting at 0. The first network interface device is therefore eth0.

 

If you have more than one network interface device, they will all be listed in the Network Devices section. When you click the Edit button, a new form will popup for you to configure the network device in question. As you do not wish to use DHCP for this interface, uncheck the Configure Using DHCP checkbox. This will then allow you to enter a network IP address and Netmask in the appropriate form fields. Once completed, hit OK.

 

Once you have configured an IP address, you may now enter a hostname for the system. The default hostname localhost.localdomain is not suitable and you will need to enter a more appropriate hostname for the system. For example, I am using ‘openfiler.applicationdelivery.co.uk’.

 

openfiler11.png

 

openfiler12.png

 

Once complete, hit Next

 

7. Time Zone Selection

 

Set the default system time zone. You can achieve this by following the instructions on the left side of the

screen. If your system BIOS has been configured to use UTC, check the UTC checkbox at the bottom of the

screen and click Next to proceed.

 

openfiler14.png

 

 

8. Set Root Password

 

You need to configure a root password for the system. Be creative and select a suitable password and enter it twice in the provided textboxes. When you

are satisfied with your entries, click Next to proceed with the installation process. (I used ‘password’, nobody would guess that right?)

 

openfiler15.png

 

9. Kick off the Installation

 

Hit Next, sit back and relax, in a few minutes you will have your very own, free, advanced storage solution.

 

openfiler16.png

 

openfiler18.png

 

 

Now that we have setup Openfiler, it is time to set up some disk space for ESX to utilise.

 

1. Logon to the Openfiler Web Interface console

 

Launch a browser window (this works perfectly well on a mac with safari). Navigate to https://openfiler_IP_or_DNS:446. Logon as username = openfiler, password = password (these are the defaults and can be changed).

 

openfiler2a

 

2. Start up the essential services

 

By default Openfiler has the iSCSI target and NAS services disabled, we must enable these to continue with our configuration. Click on the services tab and then start the iSCSI target, NFSv3 and SMB/CIFS services.

 

openfiler3a

 

4. Next we need to create a disk partition for presentation to our ESX servers

 

Click on the ‘Volumes’ tab, and then on the right click ‘Block Devices’.

 

openfiler4a

openfiler5a

 

Next, highlight the the disk you originally installed Openfiler on (there should be some free disk space here).

 

openfiler6a

 

Scroll down the screen until you see the ‘create a partition in /dev/diskname. I have 65GB of disk space left in my tiny scsi disk, so I am going to create a partition of 50GB by using the attributes listed below. Hit ‘Create’

 

openfiler7a

 

5. Creating a Volume Group

 

Now that we have our disk partition, we need to create a volume group and then add the disk partition from step 4. Click in the ‘Volumes’ tab, give it the volume group name ‘ESX’ and then select the disk partition from step 4. Choose ‘add volume group’.

 

openfiler8a

 

6. Creating an iSCSI Volume within the ESX Volume Group.

 

Click on the ‘Volumes’ tab and then select the ‘Add volumes’ option on the right. Select the Volume Group we create in step 5 (ESX), scroll down the page and choose to create a new volume from within the ESX volume group. Select your desired space and ensure that the filesystem is set to ‘iSCSI’. Hit ‘Create’.

 

openfiler9a

 

7. Creating an iSCSI target

 

Now that we have set our disk up, we need to present it to our ESX Servers. Again, select the ‘Volumes’ tab and on the right, choose ‘iSCSI Targets’. You will be presented with a Target IQN, select ‘Add’.

 

We now have an iSCSI target created with default attributes, we now need to map the iSCSI LUN we created from step 6. Select the ‘Lun Mapping’ option, review the LUN created in step 6 and hit ‘map’.

 

openfile10a

On the Network ACL tab, you will be highlighted to the fact that you havent set any up yet. Click on the link which will take you to the section where you can add your ESX servers to the ACL list.

openfileracl1Next add the list of ESX hosts

 

openfileracl3

Then add the host to the LUN and ensure that they are set to allow

 

openfileracl4

 

That’s it. We are now ready to move over to VMware’s Virtual Infrastructure Client where we will add the iSCSI volume and format it as VMFS ready for hosting virtual machines.

 

Configuring an ESX server to use the Openfiler iSCSI LUN

 

I am going to assume that you have already installed ESX 3.x already and that you have a vmotion interface setup and the functionality is enabled within the license management components (otherwise this post is going to be waaay to long). So this is what you need to do to see this disk space and ultimately use it for virtual machine storage.

 

1. Configure the ESX firewall to allow iSCSI software initiator out.

 

Log into the VI client, and highlight the ESX server that you wish to configure, select the ‘configuration’ tab. From within the ’software’ section on the left lower panel, select ’security profile’, select ‘properties’. Ensure that the iSCSI initiator is checked.

 

vmwareiscsi1

 

vmwareiscsi3

 

2. Enable the iSCSI software initiator

 

Again, from within the configuration tab, select ’storage adapters’ highlight the ‘iSCSI Software Adapter’ and the hit ‘properties’.

 

 

vmwareiscsi5

 

On the general tab, click configure and enable the adapter.

 

vmwareiscsi6

 

On the dynamic discovery tab, add the IP address of the Openfiler server (leave the port as default)

 

vmwareiscsi7

 

Click close

 

3. Scan for the new iSCSI LUN

 

Again, from within the configuration tab, select ’storage adapters’ and then (just in the top right corner) select ‘Rescan’. Select options for both VMFS partitions and HBA’s

 

vmwareiscsi8

 

Once the scan has been completed you should now be able to see the new volume from within the ’storage’ section.

 

4. Formatting the iSCSI volume with VMFS

 

Still from within the configuration tab, highlight storage and then click ‘add storage’.

 

vmwareiscsi9

 

Select Disk / Lun and hit Next.

 

You should now see the iSCSI we have created. Select to format the disk as a 1mb block size and that is it. If you repeat this step on all the ESX servers that you want to present to, you will have shared storage ready for services such as VMotion, HA and DRS.

 

If you are stuck or need to know more information you can get me on linkedin.com

 

Regards,

Lee Wynne

 

View Lee Wynne's profile on LinkedIn

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Comments are closed.