This page will contain a list of (relatively) small annoyances and issues present in FreeBSD 7 (and possibly earlier versions), with the purpose of forewarning and helping others that have stumbled on the same problems as I have. These are nothing special and some of them may be documented elsewhere.

tmpfs and fstab

If you mechanically add "2" to the end of fstab lines (fsck pass#), you'll get a big surprise the next time you reboot the machine if you try to add tmpfs to the list, or change the entry from md-based /tmp to tmpfs. The problem is that there's no fsck for tmpfs so when the machine boots, it will try to check the file system, will fail and stop the boot process. The solution is to simply change the "2" to "0".

SCTP depends on IPv6

You can't build a kernel with SCTP option but without IPV6 option, so remove it together with IPV6.

ZFS manipulation needs writable /boot

Modifying zpools and zfs (e.g. adding devices to zpools) needs to be done with /boot/zfs directory writable. Since /boot is usually on the root file system, the root partition needs to be writable. This is important in single user mode where the root file system is mounted read-only. After mounting it rw, and before starting ZFS with /etc/rc.d/zfs start, hostid must be initialized with /etc/rc.d/hostid start. Failure to have /boot writable while changing zfs structure will result in a panic when ZFS is started "regularily" the next time. This can be fixed by deleting zpool.cache from /boot/cache and performing zfs import. Failure to initilize hostid will result in ZFS file system(s) not being present the next time ZFS is started, which can be fixed by zfs import -f.

Compiler flag -Os might produce bad code

There have been many reports, and my own experience supports them, that using gcc -Os flag (optimize for smaller code) sometimes produces bad code. The symptoms vary wildly over architectures and flag combinations, so that a system that appears to be working fine might have subtle bugs lurking to be discovered in the most inconvenient time. This affects both the kernel and the userland. The compiler in FreeBSD 7.0 is gcc 4.2.1. This might be fixed in the future by importing a newer version of the compiler, but don't assume it's happened if you need the flag.

ZFS is only experimental

ZFS (the file system) is an experimental feature in FreeBSD. Don't even try using it before proper tuning.