This page describes how to configure OpenFiler version 2.99.1 on bare metal, and work through some of the issues. I had tested version 2.3 some years ago, but settled on FreeNas7 for my home network shares. Now I want to use a spare HP DL385G3 server, and create an iSCSI SAN, so it was between FreeNAS8 and OpenFiler 2.99.1. It took me about 6 different installation attempts before I got it right, what with the updates screwing me up, the LDAP store getting corrupted, the USB drives getting lost on reboot, lost shares at reboot, and other such issues. But in the end, I liked OpenFiler better, and was able to work out my issues with it.
As always, it begins with a download. But unlike the virtual appliance method for VMWare, this takes a little more effort. So here are the steps I followed to get my setup working the way I wanted :
From that point, its all about tuning/customization to get it to "fit" into my infrastructure. Configuration for me consisted of getting the additional NIC's configured, adding my external storage, configuring my volume groups, volumes, shares, and access. Seems simple enough, but it took quite a few trials to get right. Here are the steps used in the last (successful) installation.
I wanted a raid array of my three USB external drives. So I went into the "Volumes" tab, and on the right side, choose "Add Volume".
The key here is to make sure that when adding a device, choose the type of "RAID Array Member" - that's the key. I had to do this for all three drives. I basically carved up my drives into one big partition, which I made the RAID slice. This means that this is now basically a physical volume, which we can carve out into smaller parts using LVM.
To make the first usable logical volume, go into the "Volume" tab again, and construct a volume from those raid slices. I had 2TB drives, so I carved up a 1.5TB volume, another 1.5TB volume, and left the rest free for now. Note that when carving up a volume, it wants the file system type. Resist the temptation of using ZFS/BTRFS - because at least for me, this created such problems for machine that it wouldn't stay up past 20 hours. So I recreated as EXT4 and its been rock solid (and faster) ever since.
Then just reboot the system, but ONLY after confirming that the background tasks are completed.
There are some good sites out there with information about this stuff. One such site is about configuring VMWare vSphere for iSCSI. One of the tough things to find is actual documentation - well, tough to find for free. There is still the old version of the old OpenFiler documentation which is still helpful, albeit a little outdated. I actually preferred to work with the PDF version, because it was easier to print and also easiser to search through. It covers the older 1.1 version, so the screens are a little dated, but for the most part, it covers the basics. For example, page 5 shows how to login - which I didnt know by default. Same for configuring services, adding volumes, etc.
The script I setup to get around the issues with software raid is shown below. I put it in /etc/init.d/software-raid-fix.
#!/bin/sh
#
# chkconfig: 345 99 01
# description: # Fix software raid not auto-assembling
#
# ident "@(#)software-raid-fix 2.0 - (C) pluzzi Software 2008"
##############################################################################
#
#
#####
##### Added by Paul A. Luzzi on 11/04/2011
#####
##### Purpose : This section added to fix software raid not auto-assembling.
##### Its designed to find missing volume groups, activate then, search
##### for any filesystems in those volume group volumes, and reshare them.
#####
##### Tested on OpenFiler 2.99.1 ... not sure if this works on OF 2.3
#####
# Source function library.
. /etc/rc.d/init.d/functions
# See how we were called.
case "$1" in
start)
#
echo "Collecting existing VGs : "
vgdisplay | grep "VG Name" | awk '{print $NF}' > /tmp/vgd.boot
#
echo -n "Assembling the meta devices : "
/sbin/mdadm --assemble --scan
#
echo "Collecting current VGs : "
vgdisplay | grep "VG Name" | awk '{print $NF}' > /tmp/vgd.post
#
echo "Activating the volume group for meta based groups : "
diff /tmp/vgd.boot /tmp/vgd.post | grep "^>" | awk '{print $NF}' | while read VGNAME
do
echo -n "Activating volume group $VGNAME "
/sbin/vgchange -ay $VGNAME
done
#
echo "Mounting filesystem shares :"
## mount -a
lvdisplay | grep /dev | awk '{print $NF}' | while read DEVICE
do
echo -n "Mounting $DEVICE at $MOUNTPOINT"
FSTYPE=`grep -w "$DEVICE" /etc/fstab | awk '{print $3}'`
MOUNTPOINT=`grep -w "$DEVICE" /etc/fstab | awk '{print $2}'`
DEVICENAME=`grep -w "$DEVICE" /etc/fstab | awk '{print $1}'`
mount -t $FSTYPE $DEVICENAME $MOUNTPOINT
done
#
echo -n "Restarting NFS to catch any new shares :"
/etc/init.d/nfs restart
#
echo -n "Restarting SMB to catch any new shares :"
/etc/init.d/smb restart
#
echo
;;
stop)
echo -n "No action needed for $0"
echo
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
Thats it!