How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

49
Installation of Openfiler using the standard graphical-based installation method. Introduction This document describes the process of installing Openfiler using the default graphical installation interface. If you experience any problems with the graphical install track, such as a garbled screen due to the installer not being able to auto-detect your graphics hardware, please try a text-based install. The text- based install track is described here . Total time for installation is about 15 - 20 minutes including software installation to disk. System Requirements Openfiler has the following hardware requirements to be successfully installed: 1. x86 or x64 based computer with at least 512MB RAM and 1GB storage for the OS image. 2. At least one supported network interface card 3. A CDROM or DVD-ROM drive if you are performing a local install 4. A supported disk controller with data drives attached. Please see full system requirements information here. Installation The installation process is described with screenshots for illustrative purposes. If you are unable to proceed at any point with the installation process or you make a mistake, use the Back button to return to previous points in the installation process. Any errors or intractable problems with the installation process should be reported either to the Openfiler Users mailing list or, alternatively, if you feel you have found a bug please use the bug tracking system . If you report a bug, be sure to enter a valid email address so that you can keep track of any updates to

Transcript of How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Page 1: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Installation of Openfiler using the standard graphical-based installation method.

Introduction

This document describes the process of installing Openfiler using the default graphical installation interface. If you experience any problems with the graphical install track, such as a garbled screen due to the installer not being able to auto-detect your graphics hardware, please try a text-based install. The text-based install track is described here.

Total time for installation is about 15 - 20 minutes including software installation to disk.

System Requirements

Openfiler has the following hardware requirements to be successfully installed:

1. x86 or x64 based computer with at least 512MB RAM and 1GB storage for the OS image.

2. At least one supported network interface card

3. A CDROM or DVD-ROM drive if you are performing a local install

4. A supported disk controller with data drives attached.

Please see full system requirements information here.

Installation

The installation process is described with screenshots for illustrative purposes. If you are unable to proceed at any point with the installation process or you make a mistake, use the Back button to return to previous points in the installation process. Any errors or intractable problems with the installation process should be reported either to the Openfiler Users mailing list or, alternatively, if you feel you have found a bug please use the bug tracking system. If you report a bug, be sure to enter a valid email address so that you can keep track of any updates to it right up to resolution. You *must* first register with the bug tracker in order to be able to post a new bug.

Starting the Installation

To begin the installation, insert the Openfiler disk into your CD/DVD-ROM drive and ensure your system is configured to boot off the CD/DVD-ROM drive. After the system POSTs, the installer boot prompt will come up. At this point, just hit the Enter key to proceed.

Page 2: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

After a few moments, the first screen of the installer will be presented. If at this point your screen happens to be garbled, it is likely that the installer has been unable to automatically detect your graphics subsystem hardware. You may restart the installation process in text-mode and proceed accordingly in that case. The first screen of the installer is depicted below. The next step is to click on the Next button to proceed with the installation.

Page 3: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Keyboard Selection

This screen deals with keyboard layout selection. Use the scroll bar on the right to scroll up and down and select your desired keyboard layout from the list. Once you are satisfied with your selection, click the Next button to proceed.

Page 4: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Disk Partitioning Setup

Next comes the disk partitioning.  You must select manual disk partitioning as it ensures you will end up with a bootable system and with the correct partitioning scheme. Openfiler does not support automatic partitioning and you will be unable to configure data storage disks in the Openfiler graphical user interface if you select automatic partitioning. Click the Next button once you have selected the correct radiobutton option.

Page 5: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Disk Setup

On the disk setup screen, if you have any existing partitions on the system, please delete them. DO NOT DELETE ANY EXISTING OPENFILER DATA PARTITIONS UNLESS YOU NO LONGER REQUIRE THE DATA ON THEM. To delete a partition, highlight it in the list of partitions and click the Delete button. You should now have a clean disk on which to create your partitions.

Page 6: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

You need to create three partitions on the system in order to proceed with the installation:

1. "/boot" - this is where the kernel will reside and the system will boot from2. "swap" - this is the swap partition for memory swapping to disk

3. "/"- this is the system root partition where all system applications and libraries will be installed

Create /boot Partition

Proceed by creating a boot partition. Click on the New button. You will be presented with a form with several fields and checkboxes. Enter the partition mount path "/boot" and the select the disk on with to create the partition. In the illustrated example, this disk is hda (the first IDE hard disk). Your setup will very likely be different as you may have several disks of different types. You should make sure that only the first disk is checked and no others. If you are installing on a SCSI-only system, this disk will be designated sda. If you are installing on a system that has both IDE and SCSI disks, please select hda if you intend to use the IDE disk as your boot drive.

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

1. Mount Point: /boot

Page 7: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

2. Filesystem Type: ext3

3. Allowable Drives: select one disk only. This should be the first IDE (hda) or first SCSI disk (sda)

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

5. Additional Size Options: select Fixed Size radiobutton 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)

After configuration, your settings should resemble the following illustration:

Once you are satisfied with your entries, click the OK button to create the partition.

Create / (root) Partition

Proceed by creating a root partition. Click on the New button. You will be presented with the same 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.

Page 8: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Once you are satisfied with your entries, click the OK button to proceed.

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.

Page 9: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Once you are satisfied with your entries, 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:

Page 10: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

You have now completed the partitioning tasks of the installation process and should click Next to proceed to the next step.

Network Configuration

In this section you will configure network devices, system hostname and DNS parameters. You will need to configure at least one network interface card in order to access the Openfiler web interface and to serve data to clients on a network. In the unlikely event that you will be using DHCP to configure the network address, you can simply click Next and proceed to the next stage of the installation process.

Page 11: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

If on the other hand you wish to define a specific 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. Enter your desired settings and click OK to proceed.

Page 12: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Once you have configured a network 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 proper hostname for the system. This will be used later when you configure the system to participate on your network either as an Active Directory / Windows NT PDC client or as an LDAP domain member server. You will also, at this point, need to configure gateway IP address and DNS server IP addresses. To complete this task you will need the following information:

1. Desired hostname - this is the name you will call the system. Usually this will be a fully qualified hostname e.g homer.the-simpsons.com .

2. Gateway IP address - this is the IP address of your network gateway to allow routing to the Internet

3. Primary DNS Server - this is the DNS server on your network. Note that if you intend to use Active Directory or LDAP as your authentication mechanism, you will need to assign a functional DNS IP address so that the authentication mechanism is able to resolve the authentication server hostnames.

4. Secondary/Tertiary DNS Server - enter a second and third DNS server if they are available on your network.

The following illustration shows an example where a hostname has been assigned, and gateway IP, primary and secondary DNS information has also been entered.

Page 13: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Once you are satisfied with your entries, please proceed by clicking the Next button.

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.

Page 14: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Set Root Password

You need to configure a root password for the system. The root password is the superuser administrator password. With the root account, you can log into the system to perform any administrative tasks that are not offered via the web interface. 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.

Page 15: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

NB: the root password is meant for logging into the console of the Openfiler server. The default username and password for the Openfiler web management GUI are: "openfiler" and "password" respectively.

About To Install

This screen informs you that installation configuration has been completed and the installer is awaiting your input to start the installation process which will format disks, copy data to the system and configure system parameters such as setting up the boot loader and adding system users. Click Next if you are satisfied with the entries you have made in the previous screens.

Note

You cannot go back to previous screens once you have gone past this point. The installer will erase any data on the partitions you defined in the partitioning section.

Page 16: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Installation

Once you have clicked Next in the preceding section, the installer will begin the installation process. The following screenshots depict what happens at this point.

Page 17: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX
Page 18: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX
Page 19: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Installation Complete

Once the installation has completed, you will be presented with a congratulatory message. At this point you simply need to click the Reboot button to finish the installer and boot into the installed Openfiler system.

Note

After you click Reboot remove the installation CD from the CD/DVD-ROM drive.

Page 20: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Once the system boots up, start configuring Openfiler by pointing your browser at the host name or IP address of the Openfiler system. The interface is accessible from https port 446. e.g.. https://homer.the-simpsons.com:446.

Management Interface: https://<ip of openfiler host>:446

Administrator Username: openfiler

Administrator Password: password

You can learn how to manage the Openfiler system by browsing the administrator guide online which can be found here.

Congratulations

Congratulations! Thank you for choosing to use Openfiler.

Page 21: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

How to configure OpenFiler v2.3 iSCSI Storage for use with VMware ESX.

Until recently I had been running my ESX VM’s on local 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 ESX 3.5 and ESXi 3.5 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 always 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):

OpenFiler Free NAS

Xtravirt

EMC Celera (VM) – log into the EMC portal and search for ‘Celerra Simulator’.

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. 

Page 22: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

As you can see there are many different downloads available.  I decided to install it on old Shuttle XPC PC I had lying about.  This server has 1GB of memory, Single AMD64 2GHz CPU and a single Gigabit NIC all of which are more than adequate for running OpenFiler.  I downloaded and installed the x86_64 version.

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

For this lab install I have used the following network configuration.

OpenFiler (Shuttle PC) NIC: Single port 1Gb IP: 10.0.0.1/24

ESX Server (ML110 G5) ESXi 3.5.0 U3 NIC: Dual port NIC IP#1 (iSCSI): 10.0.0.10/24 IP#2 (General Traffic): 192.168.1.11/24

Management Server (Home Brew PC) OS: Windows 7 NIC: Dual port NIC IP#1 (iSCSI network – for management of OpenFiler): 10.0.0.2/24, IP#2 (General Traffic): 192.168.1.1/24

 

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). 

Page 23: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

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’.

 

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

Page 24: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

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.

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

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.

Page 25: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

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 3 – Create a New Volume Group:

Next we want to create a new ‘Volume Group’ 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’

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

Page 26: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Step 4 – Create a Volume:

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

Now select the ‘Volume Group’ 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 Group’.

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)!

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

Page 27: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

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.

 

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.

Page 28: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

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.

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 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.

Page 29: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

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.  In my lab I have created two VLAN’s on my Linksys SLM2008.  One for general network traffic and the other for the iSCSI traffic.

 

Step 9 – VMware ESX iSCSI Configuration:

Open up the VMware Virtual Infrastructure Client (VIC) and select the ESX server that you want to add the iSCSI storage to.  From the ‘Configurations’ tab in the right pane select ‘Networking’.  You will now be presented with the networking configuration for that ESX server.

As you can see my particular install of ESX is using ESXi.

I have created a second Virtual Switch and have allocated a VMKernel port on the second NIC port (which is patched into the 10.0.0.0/24 VLAN) which I have given a 10.0.0.11/24 IP address.  The is the port that the iSCSI traffic will use.

Page 30: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

If you are configuring this using ESX 3.5 then you will also have to add a ‘Service Console’ port to this newly created Virtual Switch.  If you don’t do this you’ll get this friendly reminder:

We now want to look at the ‘Storage Adapters’.  Click on this option in the ‘Hardware’ menu.

You will see that there is an iSCSI Software Adapter already in place – though currently not enabled.  All that needs doing is to configure and point it to the OpenFiler LUN(s).  Notice how all the iSCSI related details are currently blank.

Click on the ‘iSCSI Software Adapter’ and select ‘Properties’.

The status of the iSCSI Software Adapter is initially set to ‘Disabled’.  We want to enable it and assign the relevant details.  Click on ‘Configure’. Check the ‘Enable’ status box and click ‘Ok’

Page 31: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

The iSCSI properties will now be populated (see below).  I won’t go into the format of the iSCSI name and alias though the VMware Infrastructure 3: Advanced Technical Design Guide and Advanced Operations Guide has a good section on iSCSI and explains these details.

Clicking on the ‘Dynamic Discovery’ tab and selecting ‘Add’ we are presented with an ‘Add Send Targets Server’ dialogue box.  This is where we’ll enter the IP address of our OpenFiler server/SAN. (Note: the ‘Static Discovery’ tab is only used when using a hardware iSCSI initiator)

After entering in this IP information and pressing ‘Ok’ it can take a little while before iSCSI server is detected.

Page 32: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

With these new iSCSI setting we are prompted to re-scan the host.  Select ‘Yes’

After ESX has finished its re-scan you should now see the LUN(s) appear that you created in OpenFiler.

With this shared storage and a couple of ESX servers you can now start using some of the more interesting and powerful features of VMware ESX such as VMotion and HA (assuming you have the appropriate license  ).

As mentioned this is purely intended as a rough guide to getting OpenFiler up and running with VMware ESX.  OpenFiler has plenty of other great features and is worth investing some time into

+++++++++++++++=====================+++++++++++++++====================+++++++++++++++

Storage Management using Openfiler, Part 1

By Rajesh Deodhar on August 1, 2011 in How-Tos, Servers, Sysadmins · 0 Comments

Page 33: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Many companies use the file-sharing features of a popular proprietary desktop operating system. The main constraint is the limit on simultaneous connections to a single file share (10). The proprietary solution is to purchase a proprietary server OS license, and go on buying Client Access Licenses (CALs) for each additional connected device. However, Openfiler, an Open Source Storage Management Appliance, can be used very effectively in this situation, to deliver fantastic functionality and granular access control.

We will try to appraise this interesting and feature-rich Linux distro in a series of articles. This first part covers basic Openfiler installation and configuration, and its various storage options for a 64-bit standard installation. Openfiler can convert any computer system complying with the minimum requirements to a storage server. The specifications, from the Openfiler website, are in the following table.

Minimum SpecificationsRecommended Specifications (over the minimum specs)

32-bit 1GHz or higher-performance processor

2GB or more or RAM

2GB disk space for memory/swap area

8GB disk space for Openfiler OS installation

100MB Ethernet network interface

Separate storage volumes/disks for data export

64-bit 1.6GHz or higher-performance processor

1GB Ethernet network interface

Hardware RAID controller

The website further mentions that Openfiler is compatible with 32-bit and 64-bit industry standard server hardware too. It can also be installed in a virtual-machine environment such as VMWare or XenServer, as a guest OS. Future releases of Openfiler may only support 64-bit

Page 34: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

processors, so they are highly recommended for new Openfiler installations. Some important advantages of using Openfiler are:

No licensing cost Multiple NIC bonding

Support for iSCSI targets

Software RAID support

Remote replication for Disaster Recovery

High Availability (HA) cluster fail-over capability

Openfiler also has various other features available on standard Network Attached Storage (NAS) boxes, including access via FTP, Web server and SMB/CIFS services; authentication against a local (or remote) LDAP server, or integration with a Windows domain controller; user/group-wise access control and quota management; configuration via an easy Web-based GUI; free updates and patches. Help is available via excellent community support.

Getting started

To start exploring this wonderful distro, download your desired image from the Openfiler website. Various images are available: 32/64 bit ISOs, and various appliances for VMWare, VMWare ESX and Citrix XenServer. Our installation is based on the Openfiler 2.3 Installation ISO image (for x86/64). The hardware used here is a simple PC with an Intel 2.8 GHz dual-core CPU, with 1 GB of RAM and an 80 GB SATA hard disk.

Caution: For a fresh setup, the target hard disk for installation will be wiped “clean” by the installer. Ensure any desired data is backed up!

Start the installation by booting from a CD prepared from the downloaded ISO image. Openfiler supports a text- as well as GUI-based installation; continue with the latter. There are practically no surprises during this installation process. The most important steps during installation are hard-disk partitioning and networking, which are explained here.

Disk partitioning

If you have two hard disks installed in the computer, select the first hard disk for installation. Partition the hard disk manually, if you have a single hard disk.

Note: if you choose auto partitioning, all the disk space is taken for the Openfiler distro, leaving no space for data.

Create three partitions, as detailed in the table below. Tick the “Force to be a primary partition” check-box while creating all the three partitions.

Page 35: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

PartitionMount Point

Minimum Size

Recommended Size

Filesystem Purpose

Boot /boot 100MB 256MB ext3Kernel and other files needed for booting

Root / 1024MB 2048MB ext3 OS installation

Swap N/A 1024MB 2048MB N/A Swap space

Network configuration

Ensure you enter correct values for hostname, default gateway and DNS servers. These settings are important for patching Openfiler. Though Openfiler can get an IP address from a DHCP server, use the Edit tab at the top right corner to specify a static IP address and subnet mask. Don’t forget to tick the “Activate on boot” check-box.

Continue through the rest of the installation, and reboot to complete the first phase of installation. The Openfiler box can now be accessed in these ways:

1. Use the username root and the password configured during the installation process for access at the Openfiler PC console, or via SSH from another system.

2. Access the Web administration interface by navigating to https://ipaddress:446 (the IP address of the Openfiler PC) from any node. Here, the default login name is openfiler, and the password is password.

Updates

Immediately after the first reboot, patch the new installation. Log in at the console, and run the command conary updateall. The time required for updates depends on your Internet connection speed. Repeat the same command till you get a “Nothing to be updated” message. Now the installation is at the stage where you can create volumes, shares, groups and users, and start using the Openfiler box.

Log in to the Web administration interface. The first screen you see is status (Figure 1), where hardware and important system information is displayed.

Page 36: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Figure 1: Status screen

Initial set-up

Proceed to the System tab (Figure 2), which has the options to (re-)configure Openfiler system parameters like network configuration; clock setup (define a Network Time Protocol (NTP) server address and time zone); UPS setup (Openfiler, if connected to an intelligent UPS, can be configured to shutdown when the UPS signals low battery state); backup/restore configuration; and secure console (SSH access).

Page 37: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Figure 2: System screen

Note: Some advanced options, such as bonded interface creation and HA cluster setup are not covered here.

Complete the “Network Access Configuration”. You can allows access to a single host, or the full subnet. Under our test setup, we allowed access to the 192.168.51.0/255.255.255.0subnet (Figure 3).

Figure 3: Network access configuration

The next step is to create a volume group on the desired hard disk, using the Volumestab (Figure 4).

Page 38: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Figure 4: Volume group management

Under the test setup, the group name was firstvolume. Continue by selecting firstvolume from the Add Volumes tab. The new volume should be defined along with disk-space allocation and volume type (ext3/XFS or iSCSI). Here, we defined Songsas the volume name (Figure 5), allotting 37000 MB of disk space. We preferred ext3, from the data-recovery perspective. The time required to complete this step will vary depending on CPU and hard disk speed.

Page 39: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Figure 5: New volume creation

Note: You may use the Managing Volumes tab to increase the size of a created volume (from the corresponding Volume Edit link), and create snapshots of the volumes. Note that once a snapshot is created for a volume, the allotted disk space cannot be increased.

Groups and users

Next, we create groups and users. The LDAP service must be active to do this. From the Accounts tab, select the Authentication menu. Fill in the LDAP settings (Figure 6), and tick the “Use Local LDAP Server” check-box. Submit the configuration information, wait for about a minute, and under the Servicestab, verify that the LDAP service is enabled.

Figure 6: Fill in the LDAP server settings

Instead of LDAP, you can configure authentication with a Windows domain controller from this page. Administrator credentials are required to enable access control based on preconfigured groups and usernames. LDAP service configuration may give a few surprises, which will result in failure to create groups and users. Try the following if you are facing problems at this juncture:

1. Clear and rebuild the LDAP server from the Services –> Setup menu.

Page 40: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

2. Make sure that you have updated Openfiler fully using conary updateall as discussed earlier. If not, do so now. (Community forums report that there was a bug in the original distro, which was fixed by updates. While preparing screenshots for this article, I had taken a shortcut of not updating the distro. Ultimately, LDAP failed, and I had to complete updates before proceeding (Figure 7).

Figure 7: Console output after a successful 'conary updateall' run

Create a new group, overriding the GID. Here, a GID range starting from 501 is used for the SongLoversgroup. Additional groups can be created as and when required, for granular access control. Go on creating user accounts with their passwords, and assign them their primary group (Figure 8).

Page 41: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Figure 8: Add new user

Note: To change groups and users settings, use the Group/User administration tabs.

Quota allocation and shares

After creating groups and users, the next task is to allocate quotas. Here, for the SongLovers group, we assign a 20 GB quota. User-wise quota definition is also possible.

We also created the shares: Firstvolume –> songs –> marathi and Firstvolume –> songs –> hindi.

A new share is accessible only after granting specific access. Click the share name and configure the three required parameters — listed below:

Share access control mode: Public guest access or Controlled access Group access configuration: Primary group and type of access — No access/Read only

(RO)/Read-Write (RW)

Host access configuration: Type of access to be granted (from 5 possible services: SMB/CISF, NFS, HTTPS, FTP and RSYNC). Select all which you want, and set the share’s type of access (No/RO or RW).

Page 42: How to Configure OpenFiler v2.3 iSCSI Storage for Use With VMware ESX

Here, we defined the “marathi” share with Controlled access, giving the primary group SongLovers RW access. Further, we enabled RW access via SMB/CISF and FTP protocols (Figure 9). (Remember to use the Servicesmenu to enable the FTP service if using FTP shares!)

Figure 9: Share access control

That is all, folks!! Start browsing the shared resources by the IP address. You should see your shares—in our case, firstvolume.songs.marathi—as a shared folder. Enter your user credentials, and start using your NAS!