Alexander Kojevnikov | Blog

FreeBSD ports/UPDATING web feed

Two things recently happened to me: I fell in love with FreeBSD and I got a new job (and will be moving to Malaysia very soon!)

At the new job I will mostly be dealing with Perl and, considering it's not the language I'm most familiar with, I was looking for a small project to practice it.

Thus, was born. It's a web feed that keeps track of the /usr/ports/UPDATING file. I personally find it much easier to use a news reader than manually checking the file each time I want to update my ports.

Like most Perl scripts, the one generating the feed is short, uses a lot of CPAN modules, and is a bit ugly :) You can check it on GitHub.

P.S. As requested on freebsd-ports@ I also added feeds to head/UPDATING, stable-7/UPDATING and stable-8/UPDATING. Subscribe on

Published: 2010-09-24

Tags: freebsd perl

Growing mirrored and encrypted partitions in FreeNAS

UPDATE 2009-11-19: this post explains how to do the same in Debian.

I'm building a small NAS for the household. It will run FreeNAS and will be used as a file, rsync, BitTorrent and printer server. I want it to be reliable and secure so it will have two HDDs in RAID 1 (AKA mirroring) and their content will be encrypted.

But what if in the future I will want to upgrade the drives with larger ones? A common scenario with RAID 1 is to replace one of the disks with the bigger one, rebuild the mirror then replace the other one and rebuild it again. In theory it sounds like an easy process that will keep all your data intact.

In practice however it's not, Mike explains how to do it under FreeNAS in his blog. Growing mirrored and encrypted drives is a bit more complicated.

Here is how, in case you might need it:

# geli backup /dev/mirror/raid1 bak
# geli detach /dev/mirror/raid1
# geli clear /dev/mirror/raid1
# geli restore bak /dev/mirror/raid1
# geli attach /dev/mirror/raid1
# gpt recover /dev/mirror/raid1.eli
# gpt remove -i 1 /dev/mirror/raid1.eli
# gpt add -i 1 -t ufs /dev/mirror/raid1.eli
# gpt label -i 1 -l data /dev/mirror/raid1.eli
# growfs /dev/mirror/raid1.elip1

That's it, your encrypted partition should be functional now!

NOTE: always do your backups, I can make no guarantees this guide will work for you.

Published: 2009-11-04

Tags: freenas freebsd

Page 1 / 1