Tag Archives: freebsd

FreeBSD mfiutil and the Common RAID Format Spec

Recently I have been setting up a few new boxes that have an LSI MegaRAID controller. As of FreeBSD 8.0, there is a much more friendly tool included called mfiutil. It saves from having to install sysutils/megacli and using its rather complicated arguments (well, at first, after using it for a little while they make sense). Now, I know I setup a RAID10 that spans 3, 2 disk arrays. However, mfiutil is reporting it as a RAID1 volume.

Continue reading

Apache Cassandra FreeBSD rc.d script

We are a FreeBSD shop, so naturally we run our Apache Cassandra cluster on it. Unfortunately, there isn’t an rc.d script for it. Using cassandra/bin/cassandra -p /var/run/cassandra.pid has been working fine without any grief. However, it would be nice to utilize the rc system built into FreeBSD. I took the Tomcat 6.0 rc script that it is in the port system (www/tomcat6) and adapted it for cassandra.

Continue reading

Reset file’s modification time to their birth time

NOTE:This only works for FreeBSD.

This will change the modification time (ls -l) of the current directory and all files and directories under it back to their “birth time” (creation time). If you want to limit this use man find to figure out the proper arguments.

find . -exec sh -c 'touch -t $(date -r $(stat -f %B {}) "+%Y%m%d%H%M.%S") {}' \;

Enable logging in HAProxy on FreeBSD

This may apply to more than just FreeBSD, but it’s been tested and working on FreeBSD. I wanted to keep the syslogd locked down while letting HAProxy still log. All the example configurations I could find use a network interface to syslogd, which I have completely disabled. So this details using a local socket (which isn’t all that much different).
Continue reading