Monitoring your HDD using SMART and Nagios

“Monitoring of your computer systems is a good idea. There are many tools that let you verify that specified services are running, and available for clients. I use Nagios. You can check that Apache is still running, Postfix is still accepting mail, and various other things. If you can write a test, Nagios can monitor it.

Typically, people monitor network connections, applications, and bandwidth consumption. Until recently, I did not monitor disk health. That recently changed.

I started using three new tools:

In this article I’ll show you how I added SMART monitoring to my Nagios installation. munin is straight forward to install, but is outside the scope of this article. It is for another time.

This article also assumes you have Nagios installed and nrpe running on the host you are monitoring. I am using Fruity for my nagios configuration, so I will be glossing over that too.”

Go to the howto (FreeBSD Diary)

Upgrade FreeBSD 7.2 to FreeBSD 8 using csup (howto)

How to upgrade FreeBSD 7.2 to FreeBSD 8 stable using csup source code method including all ports?

csup is a general-purpose network file updating package. It is extremely fast program. Make sure you backup all data, MySQL / PGSQL database, and configuration file before attempting upgrade procedure.

Source-based upgrades from previous versions are well supported and recommend to gain full control of your FreeBSD 8 kernel and base systems.

  1. Edit supfile
  2. Grab FreeBSD 8 Base System
  3. Build FreeBSD 8 Base System
  4. Build FreeBSD 8 Kernel
  5. Reboot And Boot Into A Single User Mode
  6. Merge Configuration Files
  7. Verify New Installation
  8. Upgrade Ports (Applications)

Follow this detailed and step-by-step howto from cybercity.biz

Download ports simultaneously with multiple connections (howto)

freebsd_axelWe have already referred to a very useful FreeBSD tip (How to use Meta Ports to install group of ports) on psybermonkey.net before, and there’s another great howto:

Download ports simultaneously with multiple connections

By default, ports uses 1 connection to download and thus unbearably slow when a server rate limit the connection. Alternatively, we can tell ports to use external utility in order to open multiple connections and download simultaneously.

Go here to see how you can download FreeBSD ports simultaneously with Axel.

Axel tries to accelerate HTTP/FTP downloading process by using multiple connections for one file. It can use multiple mirrors for a download. Axel has no dependencies and is lightweight, so it might be useful as a wget clone on byte-critical systems.

VirtualBox: how to move FreeBSD to a new hard disk

Georges has written a post showing how to move a VirtualBox FreeBSD system to another, larger, VirtualBox drive:

“Let’s say that, like me, you once created a fixed-size virtual disk in VirtualBox, and installed FreeBSD on it. Now you’ve run out of disk space and you’d like to move your FreeBSD to a bigger-sized virtual disk. Here’s how I did it. This procedure was done with VirtualBox 2.0.{4, 6} on Windows XP.

First, with VirtualBox not running, make a backup copy of the whole .VirtualBox folder, just in case.

Start VirtualBox and select your FreeBSD virtual machine.

In Settings, Hard Disks: create a new Hard Disk, fixed-size. As the currently active HD is IDE Primary Master, the new HD will automatically be an IDE Primary Slave.When it’s done, click OK. The FreeBSD VM now has two hard disks. It’s like you’ve just added a new hard disk inside a real machine, a blank unformatted disk, which will be detected as a top-level IDE device (/dev/ad1) by the kernel.”

Go here for all the needed steps

FreeBSD as a WiFi Access Point

At a recent Linux users’ gathering Ivan Voras temporarily saved the day when a WRT router was not working. He set up his Acer Aspire One netbook as a wireless access point on FreeBSD 8.0. It had wired connectivity to the Internet from one side and offered WiFi via its Atheros card on the other side. In between it did NAT and protected the LAN side from the Linux hackers, both with ipfw. Here is how he configured it.

Firstly, only one non-base utility was used – dns/dnsmasq, a lightweight DHCP and DNS server. Everything else is in the base system.

Overall steps taken to create a functional FreeBSD AP with a wired connection are:

  • Configure the network interface
  • Configure firewall and NAT
  • Configure dnsmasq

Step-by-step wifi-access-point set up

Setup FreeBSD Jail with ezjail

PC-BSD has the Warden GUI to install and maintain jails. Setting these up can also, and I’m sure many would prefer this way, be set up from the console.  Cyberciti.biz has published a useful and extensive guide:

How do I setup operating system-level virtualization that allows me to partition my FreeBSD-based server system into several independent mini-systems called jails.? I’d like to set one jail for mail and another for web server via 2 public IP address.

Each jail under FreeBSD virtual environment runs on the host machine with its own files, processes, user and superuser accounts. From within a jailed process, the environment is almost indistinguishable from a real system. The easiest way to set, create and modify jails is using a framework called ezjail.

Setup FreeBSD Jail with ezjail