Sunteți pe pagina 1din 19

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.

Just to be clear, let me walk you through the steps to build Openfiler VM. Download the 64-bit ISO of Openfiler deploy as a VM.
My understanding is that Openfiler is built on Debian 5 so I chose Debian GNU/Linux 5 (64-bit) as the guest OS.

I gave the box a single vCPU and 1GB. I left the default SCSI controller and gave it one 10 GB virtual hard disk for the OS install. I
went back and added a second virtual hard disk of 100 GB to store the data. I tried a configuration with only one 100 GB virtual
hard disk, installing the OS on one partition and using the rest for storage, but I could not get Openfiler to use the remaining space
for storage. So I just added a second hard disk. Finish the rest of the VM build with all default values.

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.0
Before powering on the VM for the first time, right-click the VM and go to Edit Settings5 Add a second hard drive of 100 GB using
default values for everything else.

Installing Openfiler 2.99

Turn on the Openfiler VM and load the ISO. Reboot into the ISO and Openfiler. Press enter or just wait a few seconds for it to
continue from the first page.

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.0
Press Next to start the installation. Press Next after choosing your language. You may get a warning because the installer
recognizes an uninitialized hard drive. Realize youll be losing data if its present on the hard drive and press Yes to continue. On
the partition page, both hard drives you added are checked by default as installation drives. Youll want to uncheck the 100 GB
hard drive labeled sdb. Well configure this later. You may want to check the box next to Review and modify portioning layout.
Click Next.

Youll get another warning about losing any data present on your hard drives. This is, of course, ok since we know theyre new
drives. Click Yes to continue. If you checked the box to review the partitioning layout, you can see the dives you added, labeled
/dev/sda for the 10 GB hard drive where youll install Openfiler and, scrolling down, youll see 100 GB of free space where your
data will go. Click Next to continue.

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.0

Your data drive is labeled as /dev/sdb and you can see theres 100 GB free.

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.0
Choosing the default EXTLINUX boot loader work fine. Go ahead and click Next. On the networking page, go ahead and check
the box next to each network interface, eth0 and eth1. Highlight each of them in turn and click Edit to configure your IP settings.
So Ill configure it to have an IP address in that subnet. I disabled IPv6 support because I know Im not using it. You can leave it
enabled if you want. It wont hurt anything.

Add in default gateway and DNS information here. Click Next when finished.

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.0

Feel free to configure a time zone and Next when done. And finally, enter a root password. Press Next when done. If youre
happy with your choices so far, click Next to actually install Openfiler. Youll see Openfiler formatting your configured partitions
as requested. Your 100 GB data partition will be formatted by ESXi for VMFS3 later on when you add storage to your hosts. Once
the installation is finished, click Reboot and well start configuring Openfiler.

Configuring a Single LUN with Multiple iSCSI Targets


The boot loader screen below is what youll see each time Openfiler boots. Either press enter to continue or wait the allotted time
and Openfiler will start automatically.

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.0

Once you see the screen below, you can close the console to the Openfiler VM. Youll mainly work from Openfilers web interface,
not the command line below. Take note of the web administration address give below. Its HTTPS and you have to specify port

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.0
446. The IP address of the web interface is the IP address of the network interface, eth0.

From a computer connected to your front-end network, type in the address to the Openfiler web interface. In this case, I typed in
https://10.240.1.105:446. Your web browser may holler about an untrusted certificate. Just ignore it and continue on. Once at the
Openfiler web login screen, enter the default username and password of openfiler and password without the quotes.

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.0
Once logged in, lets start configuring! On the top menu, go to System.

Scroll down and enter your ESXi host information into the Network Access Configuration. The purpose of this blog post is to show
you how to configure shared storage using Openfiler so you should have at least two ESXi hosts. In my test lab, I have three, so I
have three items to configure on this page. You can put anything you like in the Name column, but I put something descriptive
that lets me know for what device Im configuring access. Be careful here. As I mentioned at the beginning of my post in the
mistakes I made section, for shared storage, youll want to specify an exact host for which youll want to allow access. This means
specifying the IP addresses of the network adapters on each ESXi host youll be using for iSCSI traffic under the Network/Host
column. For each ESXi host, under the Netmask column, be sure to use 255.255.255.255. You can only add or delete one item
at a time, pressing update after each change.

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.0
When you have your ESXi hosts configured, click Volumes on the top menu, then Block Devices on the menu on the right, then
click on your second hard drive, /dev/sdb.

Scroll down to create a partition. The only change you need to make is to make the Partition Type Physical Volume instead of
the default Extended Partition. Click Create after making this change.

After creating your partition, you can see it created above. Click Add Volume.

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.0

Scroll down and fill in the information for creating a volume. Give it any Volume Name you like. I chose the very original filer1
with a Volume Description of data. Be sure to move the Required Space slider all the way to the right and fill up your entire
partition. If you leave the default setting of 32 MB (which is ridiculously small), youll run into problems later. Also, be sure to
change the Filesystem/Volume Type to block(iSCSI,FC,etc). Click Create when finished.

Click Volume Groups in the right hand menu and fill in the required information. A volume group name of volume1 should be
fine. Check the box next to your /dev/sdb1 and click Add Volume Group.

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.0

In the overhead menu, click on Services. Notice that the iSCSI Targer service is set to Stopped by default. You wont be able to
add iSCSI Targets without starting this service. Go ahead and click on Start to start the service.

Youll see that the iSCSI Target service is now running.

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.0

Click on Volumes in the top menu then click on iSCSI Targets in the right hand menu. This should bring you to the screen below
where you can start adding iSCSI targets. Under the heading, Add new iSCSI Target, click the Add button as many times as
you have ESXi hosts. In my case, I have three ESXi hosts, so I clicked Add three times to create three iSCSI targets. If you have
two ESXi hosts, youll create two iSCSI targets. Each ESXi host will connect to a single iSCSI target. Well make sure that each
iSCSI target you create gets mapped to the same LUN.

Once you have your iSCSI targets created, youll need to configure each one. You can see all your created iSCSI targets if you
expand the drop down box. I created three targets so I see three targets. Each target will make use of the circled menus: Target
Configuration, LUN Mapping, and Network ACL. For consistency, choose the top-most iSCSI target from the drop down list. In this

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.0
case, Ill choose the target whose last two digits are 9b. Click the Change button next to the target to switch to that targets
settings. Click the LUN Mapping item.

The LUN Mapping screen is where you map iSCSI Targets to iSCSI LUNs. Weve created a single LUN, so the only option we
have is to map our first iSCSI target to our only iSCSI LUN. Click the Map button on this screen.

Next, click the Network ACL menu. Notice the iSCSI target name, the long string starting with iqn. IQN stands for iSCSI
Qualified Name. Its just a unique way of addressing an iSCSI device, similar in purpose to a MAC address. Youll also see each
item you listed under the Network Access Configuration page. By default, each ESXi host listed is denied access to all iSCSI
targets. Youll have to explicitly tell Openfiler which ESXi host youll want to have access to which iSCSI target. For simplicity, well

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.0
configure the first ESXi host to connect to the first iSCSI target, the second ESXi host to connect to the second iSCSI target, and
third ESXi host to connect to the third iSCSI target.
The Network ACL screen is where youll actually mask ESXi hosts from iSCSI targets. Since were working on the first iSCSI
target, well configure the first ESXi host, esx01, to Allow in the Access column. Well leave the other hosts set to deny. When we
click the Update button, weve now masked the first iSCSI target so that only the first ESXi host can see it. The other two hosts
cannot.
Follow this process for the other two iSCSI targets. Click on Target Configuration from the top menu. Use the drop down list to
highlight the second iSCSI target. Click Change. Click on LUN Mapping from the top menu. Simply click, Map, and click on
Network ACL from the top menu. For the second host, esx02 in this case, choose Allow from the drop down menu in the
Access column. Leave the other two ESXi hosts set to deny.
Finally, configure the last iSCSI target. Click on Target Configuration from the top menu. Use the drop down list to highlight the
third iSCSI target. Click Change. Click on LUN Mapping from the top menu. Click, Map, and click on Network ACL from the
top menu. For the third host, esx03, choose Allow from the drop down menu in the Access column. Leave the other two ESXi
hosts set to deny.

Although youre done for the moment, dont close your web browser. Youll need to access the IQNs of the iSCSI targets you
created. You are done configuring Openfiler for shared storage. The final step is to configure each ESXi host in your environment
to see their respective iSCSI targets and thus the shared storage to which each iSCSI target is mapped.

Configuring ESXi 5.0 Software iSCSI Storage Adapters


Using your vSphere client, connect to your vCenter Server. In the screenshot below, Im viewing the first ESXi host, esx01, and
Im on the Configuration tab viewing the Storage Adapters. You can see Ive highlighted the built-in VMware iSCSI Software
Adapter. By highlighting the iSCSI adapter, I can now modify its properties. In the box below the adapters list, click on
Properties.

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.0

Clicking Properties brings up the iSCSI Initiator Properites dialogue box. If you arent already using the iSCSI software initiator,
youll first have to enable it. Do this by clicking, Configure. In the General Properties dialogue box that appears, check the box
next to Enabled, and click OK to close the General Properties dialogue box.

Since you still have your web browser open to Openfiler, go back to Volumes, iSCSI Targets. Choose the first iSCSI target from
the drop down list and click change. Click on Network ACL from the top menu. Youll see the IQN of the iSCSI target at the top of
the page. You need to copy this IQN, everything in between the quotes, into the iSCSI Initiator Properties of your first ESXi host.
You can either write down the IQN number and type it into the iSCSI Initiator Properties, or you can simply copy and paste.
Obviously, youll reduce the chances of mis-typing if you copy and paste.

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.0
Back in the vSphere client and the iSCSI Initiator Properties dialogue box, click on the Static Discovery tab and click the Add
button at the bottom. The Add Static Target Server dialogue box appears. Enter the IP address of the Openfiler box. Remember,
Openfiler has two network cards; one for the management network and one for iSCSI traffic. In this exercise, the IP address of my
Openfiler management NIC is 10.240.1.205 and the IP address of my Openfiler iSCSI NIC is 172.16.1.205. Enter Openfilers
iSCSI NIC address in the iSCSI Server edit box and the IQN of the first iSCSI target. The port number should be left at its default
3260 value.

Click OK when finished and after a few seconds, your configuration should appear in the Static Discovery tab under Discovered
or manually entered iSCSI targets:. Finally, click Close at the bottom of this screen.

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.0

A message box will appear. Read it and click Yes.

If everythings working as it should, after a few seconds you should see Openfiler populate as a device. In the picture below, I
already had one Openfiler iSCSI VM running and connected, but this exercise is adding a second Openfiler iSCSI VM.

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

How to configure OpenFiler iSCSI Storage for use with VMware vSphere 5.0

You can also manually rescan by right-clicking the iSCSI Software Adapter and choosing Rescan or by clicking Rescan All5 in
the upper right hand corner. The Rescan All5 option takes a bit longer than right clicking the iSCSI adapter because it rescans
not one, but all of your adapters for new devices.

VEPSUN Technologies, #100 & 104, S R Arcade, Tulasi Theater Road, Marathahalli,
Bangalore. Email- info@vepsun.com www.vepsun.in

S-ar putea să vă placă și