Category: FreeBSD

  • FreeBSD – Upgrade Perl Version

    To upgrade the version of Perl installed on a FreeBSD server: vi /etc/make.conf Add this line (adjust for Perl version): DEFAULT_VERSIONS+=perl5=5.22 Execute on command line (adjust for Perl version): pkg set -o lang/perl5.16:lang/perl5.22 Execute on command line (adjust for Perl version): portupgrade -o lang/perl5.22 -f perl-5.16.\* Execute on command line: portupgrade -rf perl*

  • FreeBSD ZFS Settings On i386 Hardware

    AMD64 Kernel FreeBSD machines are good about autotuning. i386, on the other hand, needs to be adjusted manually. 1. Rebuild your kernel a. Disable/wipe all drivers you are not using or at least those you are highly unlikely to ever use. b. Add: options KVA_PAGES=512 c. Recompile/Install new kernel 2. Add these parameters to /boot/loader.conf […]

  • FreeBSD LAGG rc.conf

    This is what your rc.conf should contain to configure LAGG with FreeBSD: ### LAGG NFS Interface ### ifconfig_bce3=”mtu 9000 up” ifconfig_bce0=”mtu 9000 up” cloned_interfaces=”lagg0″ ifconfig_lagg0=”laggproto roundrobin laggport bce3 laggport bce0″ ipv4_addrs_lagg0=”″ Change the bce* interfaces to whatever your server is using for the network interfaces. The “mtu 9000 up” is correct!

  • ZFS Replication on FreeBSD

    This script will replicate a ZFS pool to another FreeBSD machine. The sync process is quick, after the initial copy, and depending upon how much data changed. Download this shell script: This script was written by another author for Solaris and I have fixed it to work on FreeBSD. I chose to use: /root/zfsrep […]

  • ZFS + List all snapshots

    zfs list -t snapshot Example Output: nas1# zfs list -t snapshot NAME USED AVAIL REFER MOUNTPOINT nfs/datastore@rep-init-20110113013713 18K – 21K – nfs/datastore@rep20110113013825 311M – 311M – nfs/datastore@rep20110113015314 0 – 68K –

  • FreeBSD LAGG / LACP Uneven Distribution

    If you have setup LAGG on FreeBSD and are noting that one NIC is getting all of the traffic. Switch to roundrobin and check results. The primary (“MASTER”) NIC will always receive the incoming traffic. With roundrobin all of the traffic will exit all NICs assigned to the LAGG.

  • FreeBSD + HAST + CARP + NFS

    FreeBSD recently introduced a disk replication setup: HAST. This is FreeBSD’s answer to DRDB for Linux. Some very good blog posts, with scripting, can be found here: FreeBSD + HAST + CARP + NFS HAST with ZFS My issues with HAST are its feeling of instability and the addition of numerous points of failure… sloppy […]

  • spamass-milter + FreeBSD

    exit 255 at /usr/local/bin/spamd line 2588. /usr/local/etc/rc.d/sa-spamd: WARNING: failed to start spamd The above error can be resolved by typing: sa-update

  • FreeBSD: Proper buildworld technique

    Follow all these steps in this exact order…this is from hard-won experience!!! 1. cvsup the correct /usr/src – example cvsup files can usually be found in /root/sup. Normally we follow the security releases e.g. RELENG 6_2 rather than stable e.g. RELENG_6 2. read /usr/src/UPDATING to make sure nothing bad is going to happen. 3. rm […]

  • FreeBSD: Aliasing IPs

    [ad#Google Adsense] Edit /etc/rc.conf The primary IP of the machine will be defined by a line that looks similar to this: ifconfig_rl0=”inet netmask″ To add additional IPs you simply: ifconfig_rl0_alias0=”inet netmask″ ifconfig_rl0_alias1=”inet netmask″ [ad#Google Adsense]