If you recall from a couple of weeks ago, I wrote "In search of the perfect virtual lab hypervisor environment", where I described my quest to create a new lab environment for myself and my coworkers. Well, during that quest, I received several queries as to "What type of SAN or NAS we're going to have". My response (Loud laughter) obviously wasn't well received. They were serious. I thought about FreeNAS, but for some reason it just wouldn't seem to work for me, so I searched and found Openfiler. Openfiler isn't perfect, but it's the best free thing I've found for emulating a real enterprise-style SAN solution.I wrote "emulating" because Openfiler isn't an EMC VNX, HP LeftHand, or Dell EqualLogic SAN. It's an inexpensive SAN solution for small business. It is what it is. It isn't fancy, but it has some cool, advanced features.
- Web Interface
- Network ACL
- Filesystem ACL
- LUN Mapping
- iSCSI, Fibre Channel
- NFS, CIFS, FTP, rsync, HTTP/DAV
- RAID support
Openfiler, although easy to use, isn't necessarily 100 percent intuitive. It takes a bit of knowledge of SANs or a pretty handy use of your Google powers to get it configured correctly for iSCSI use with VMware's ESX/ESXi. The Admin guide isn't very helpful. It leaves out a few important details that I'm going to fill in for you here.
You'll need to install disks into your SAN system. If you're configuring this SAN for housing software, ISOs, or other static data, disk speed isn't critical, so any modern SAS or SATA II or III disk should be fine. I do suggest using dual (or more) GbE NICs and very fast drives, if you intend to run VMs from the SAN. You can bond NICs after your system is up and running from the web interface.Installation is very easy, so there's no need for me to go into any detail on that aspect. It's a standard Linux installation. If you've performed a modern Linux installation, then you can do this with no problem.
I'm not supplying screenshots in this mini how-to, because it will make the post too long and this isn't really the correct venue for it, so please follow the directions as written and you should be fine. You can also ask questions if you need help.
Once installed and booted to a prompt, you're directed to point a browser to your new system's IP address using the port, 446 (For example, https://10.0.1.50:446). The username is openfiler and password is password.
Select the System tab and inspect the Network Configuration for your system. Adjust settings as needed and click the Update button. The interface will temporary not function, but it will come back so that you can continue as it applies the network settings and restarts networking.
Setup any additional interfaces in the Network Interface Configuration section.
Configure bonded NICs with the Create bonded interface link.
Enter Network Access Configuration information to allow access to the web interface. You can enter hosts, subnets, or entire networks. Set the Type to Share.
- Physical Volume - Space on a physical disk
- Volume Group - A collection of Physical Volumes
- Logical Volume or LUN - Presented to ESX/ESXi or other server
Physical Volume Setup
Select the Volumes tab. On the right hand menu, click Block Devices. Click the link under Edit Disk for the physical disk device you wish to configure a Physical Volume for. At the bottom of the screen, you'll see available disk partitions.
Unless you're creating RAID volumes, use the following settings: Mode=Logical and Partition Type=Physical volume.
Now the Starting Cylinder number is a little tricky. If it's the first partition, just accept the 1 and enter the Ending cylinder number as you wish. For any other partitions, you'll have to do some cylinder gymnastics. If you select the Starting cylinder as shown, the Create process will fail. You have to adjust the number about 5 percent higher than what you really want for it to work. The reason, I think, is that the extra 5 percent is overhead for creating the volume. I could be wrong, but in any case, you have to do it, so just do it.
You might have some space left over after you've completed creating your Physical volumes. You can ignore it or try to adjust your volume sizes to use as much of it as possible.
Creating Volume Groups
Select the Volumes tab and then click Volume Groups from the right hand menu. To create a new volume group, scroll down and enter a short, descriptive name, with no spaces, into the name field. Select a physical volume or volumes to add to the volume group. Click the Add volume group button.
Create a Volume
Click Add Volume on the right hand menu. Select the Volume Group from the dropdown menu and click the Change button. A create a volume in "Your Volume Group Name" form appears. Enter a name for your volume, with no spaces. Enter a description, if you wish. Use the slider to allocate space to the volume. I generally use all of the available space (Move the slider all the way to the right to consume the maximum space). Select iSCSI, FC, etc. from the dropdown to create this volume as an iSCSI block filesystem. Click the Create button.
Enabling iSCSI Target Service
Select the Services tab. Click the Enable link for iSCSI Target. Click the Start link. Be sure that the service is Running and Enabled.
Adding the iSCSI Target
Select the Volumes tab and click the iSCSI Targets link in right hand menu. Select the Target Configuration tab. You can keep the default Target IQN or change it. Click the Add button.
A screen displaying the values for the iSCSI Target appears. Generally speaking, you don't need to change anything, but if you do, make your changes and then click the Update button at the bottom of the screen.
Map the LUN
Select the LUN Mapping tab and map your volume(s). The defaults of write-thru and blockio seem to be fine. Click the Map button for each volume that you want to map to the displayed LUN Path.
Allow Access to the LUN
Select the Network ACL tab. Enter the network or host IP address information and then select Allow from the dropdown. Click the Update button. Since you'll probably want to access the LUN from more than one ESX/ESXi host, enter the network as: 10.0.0.0, for example. For a specific host, you'd enter, 10.0.0.50 as an example. This is the part that "presents" the LUN to the hosts for access.
The Openfiler part of the setup is now complete.
Now you have to switch to your vCenter client and scan for new datastores. The software iSCSI adapter and LUNs should show up under Storage Adapters. If they don't, then you need to enter the SAN server's IP address in the Storage Adapter configuration for each host and then rescan.
The entire process from installing Openfiler to setting up and connecting to your LUNs via vCenter should take 60 to 90 minutes, depending on the configurations you setup, how many disks, and so on.
Have you used Openfiler for SAN storage? How did you like it? Talk back and let me know.