Using Openfiler to build an iSCSI SAN
I started out just playing around with Openfiler to explore and learn some of its capabilities. After I got it installed and working I was completely impressed with the kind of performance you can get out of this piece of free software. I had been playing with the idea of building a SAN and couldn’t afford fiber channel so I had to use iSCSI. To do my testing before I built a full production machine I built a virtual to test configurations and performance. Well I was very happy with the out come. You can setup Openfiler to use as a NAS or SAN, SMB/CIFS, NFS,FTP, and HTTP/Webdav servers. It also has RAID support to help with redundancy. There is also a very well laid out web interface for configuration, monitoring, and other various features. Here is the features summary from the Openfiler website:
- Powerful block storage virtualization
- Full iSCSI target support, with support for virtual iSCSI targets for optimal division of storage
- Extensive volume and physical storage management support
- Support for large block devices
- Full software RAID management support
- Support for multiple volume groups for optimal storage allocation
- Online volume size and overlying filesystem expansion
- Point-in-time snapshots support with scheduling
- Volume usage reporting
- Synchronous / asynchronous volume migration & replication (manual setup necessary currently)
- iSCSI initiator (manual setup necessary currently)
- Extensive share management features
- Support for multiple shares per volume
- Multi-level share directory tree
- Multi-group based access control on a per-share basis
- Multi-host/network based access control on a per-share basis
- Per-share service activation (NFS, SMB/CIFS, HTTP/WebDAV, FTP with read/write controls)
- Support for auto-created SMB home directories
- Support for SMB/CIFS “shadow copy” feature for snapshot volumes
- Support for public/guest shares
- Accounts management
- Authentication using Pluggable Authentication Modules, configured from the web-interface
- NIS, LDAP, Hesiod, Active Directory (native and mixed modes), NT4 domain controller
- Guest/public account support
- Quota / resource allocation
- Per-volume group-quota management for space and files
- Per-volume user-quota management for space and files
- Per-volume guest-quota management for space and files
- User and group templates support for quota allocation
- Other features
- UPS management support
- Built-in SSH client Java applet
- Full industry-standard protocol suite
- CIFS/SMB support for Microsoft Windows-based clients
- NFSv3 support for all UNIX clients with support for ACL protocol extensions
- NFSv4 support (testing)
- FTP support
- WebDAV and HTTP 1.1 support
- Linux distribution back-end for any other customizations
I had no experience with setting up an iSCSI SAN before and found using this program to build it made thing a lot easier. Anyhow once I got Openfiler configured it was easy to get Windows Vista and Server 2008 setup because they have a built in iSCSI initiator. This can be added to XP and Server 2003 with a download from Microsoft. I found that getting it to work in XP and 2k3 was a little tricky, or maybe it was just me but it didn’t work after installation. I had to play with it a little to get it working but it does function. Getting it setup in the iSCSI initiator is really straight forward. Goto the control panel and open the iSCSI initiator and in the discovery tab simply enter the SAN IP address and click add the portal. Then in the Targets tab simply log on to the Openfiler targets and they should populate in the Volumes and Drives tab. Once this is complete the drive will need to be setup in the Windows Computer Management console. If it has not bee accessed before it will need to be partitioned and formatted along with a drive letter. With that complete the drive will show up and act like a drive that is in the physical machine its self. I know I didn’t cover any of the openfiler setup, I will do that later in the article. Here are some screen shot of the iSCSI Initiator.
Now to test the speed of the SAN I chose a few different files and simply copied them across the network. The network is all Gigabit and goes through a Cisco router with a single Gig NIC on the SAN. If this was a full production and you would see a lot of traffic you may want to add another NIC and enable the NIC teaming feature in Openfile to allow for even better performance. So to test the speed I chose 4 file of various sizes and took screen shots of the speed they go in the upload window. However with the SAN you had to use file around 150 Meg or bigger to even notice the upload window because of the speed. I uploaded the files to the SAN and to a standalone NAS the has 2TB of storage and a Gigabit NIC. Here are the screen shots of the SAN speeds.
Here are the speed from the NAS.
Now there was fluctuations in the speeds they didn’t remain constant. Plus the SAN is vulnerable to any kind of network bottle necks. The NAS would vary a few meg up or down and the SAN would vary about 30 Meg up or down. My SAN isn’t on a stand alone network it runs on the same network as all of my PCs. But the speeds are awesome and it makes anything you access seem like it is on the machine itself and not over on a separate machine.
Configuring Openfiler is a little bit of work, but it pays off to take your time. The first thing you have to do is setup the network and insure the services for the iSCSI Target and initiator are running. Once that is done you simple take the drive space you have and create volumes in a volume group.
I’m not sure if I set up the volumes or if I added a new iSCSI target first. So you may have to flip the two steps. Anyhow you have to add an iSCSI target to allow other machines to log on to the SAN. The Targets have to be set up on how you want to connect and if you want CHAP on the connections. There is a lot of settings here so I would say go with defaults unless you know what you are doing or just want to see what each does. You Must also remember to map the drive to the target. You can set everything up and forget this and nothing will work. LUN Mapping is a tab in the iSCSI Targets page. Here is some screen shots of that page.
Once this is complete you may need to do some tweaking but it should be able to login to the target using the Windows iSCSI initiator. I didn’t didn’t try to get it to work on a Linux machine yet but will in the near future. Not everyone will need a SAN but if you have the extra hardware and want to have the ability to have a redundant, fast, and multiple machine access data store. You can also use and LDAP or Active Directory to Authenticate users for the SAN. I would give building a SAN with Openfiler a shot, and no one can beat the price.