FreeBSD as an iSCSI SAN

ISCSI SAN's are on the rise and a number of data centers are installing them.  The cost for a good iSCSI SAN is not expensive in comparison to a fiber channel (FC) SAN and will give you almost the exact performance.  There are a number of applications out there that also need a SAN (FC or iSCSI) backend. If you are looking at virtualization (VMware to Hyper-V) then a backend SAN is a must.

I was recently involved in a project to get VMWare ESX server up an running.  One of the large costs to that project was the SAN (we used iSCSI).  Now, as I was unpacking our $60,000.00 plus iSCSI SAN, I thought that FreeBSD should be able to do this.  FreeBSD has always come through for me before and this sounded like a good fit. I did some research and it looks like it can. There is an iSCSI port that will allow a FreeBSD server to act as an iSCSI SAN. This article is my explination on how I set it up for testing.

Clearing the Postfix Queue

From time to time your mail queue may get filled up. This may be due to network problems or misconfiguration. For instance, if you botch (typo) the relayhost parameter, the mail will be undeliverable.

The first thing to do is fix the problem, meaning get the network back online, or fix the configuration. Issuing this command will tell postfix to try and deliver the mail from the queue.

How to install FreeBSD 7.0 under ZFS

ZFS is an exciting new file system developed by Sun and recently ported to FreeBSD (as well as many other operating systems). It has raised a wide and loyal following in the FreeBSD community (just check out the chatter about ZFS on the FreeBSD mailing lists). It offers many exciting features and possibilities that where only available on high end SAN systems just a few years ago.

Here is a list of some of the features:

vlogger error in line 456

Vlogger is a great utility that intergrates into the apache web server and spits out the logs files into separate files for each site. If you run an apache web server with a large number of virtual sites (or even a few) you should take a look at vlogger.

Vlogger has one anoying error that comes up though.  This is the error:
Argument "-" isn't numeric in numeric gt (>) at /usr/sbin/vlogger line 456, line 18

 

APC UPS Setting for NUT

Nut is great UPS software for FreeBSD.  It is located in the ports ( sysutils/nut ) and works very will with an APC SmartUPS.

There are a number of variables within the APC UPS that can be changed.  These variables control a number of aspects about how the UPS operates, when it shutsdown, and how it conditions the power.  Here is a list of the ones that I can read from my APC SmartUPS 1000.

Upgrading Perl from the Ports Collection

Upgrading perl has always been a difficult task. As with other large projects or software packages, it can have a large number of modules or libraries installed that you are using.  All these modules have to be re-installed again after Perl is installed.  This is not really hard but it is always a chore to find and/or remember all the modules you had installed, go find the port for them, and then make sure to reinstall them after. Every time I upgraded perl there was always one or two modules that I missed and I would find out about it a week or to later when I noticed a script failing.

VLAN interfaces in Linux

VLAN (Virtual Local Area Network) interfaces are a way to allow multiple networks to co-exist in a single physical interface. This is done by creating a virtual interface under Linux that tags the packet with the correct network information.  This switch that the server connects to can then determine what network the packet is going to based on the tag in the header of the packets. This feature does require a "managed" switch.  Old hubs and unmanaged switches can not handle VLANs so make sure your switches are capable of this feature.

ipfw: Too many dynamic rules

Quite often I will see the following message ....

ipfw: install_state: Too many dynamic rules

I use a lot of dynamic UDP rules and these messages are quite common on my heavily utilized DNS servers. To solve this problem, I added the following sysctl line into /etc/sysctl.conf.  You will have to see what is the best value for you. For me it turned out to be 16384

net.inet.ip.fw.dyn_max=16384

Mounting an iso file

FreeBSD >= 6.x

As of FreeBSD 5.x there is a new way to mount an iso file.  You might be wondering why  I have only tried this on FreeBSD 6.x and above.