Jails

Migrating FreshPorts from one db server to another

FreshPorts runs on a FreeBSD server which hosts multiple jails. Two of these jails run PostgreSQL server. When upgrading from one version of PostgreSQL to another, we run pg_dump in the new jail, and load the backup into that database server. I’m writing this blog post to keep track of this procedure so I do not have to remember it each time. take website offline sudo mv mv offline.conf.disabled offline.conf && \ sudo […]

Migrating FreshPorts from one db server to another Read More »

Migrating a Dell TL4000 to a new FreeBSD server and attaching it to a jail

I recently migrated a bunch of jails from one server to another. Today I attached the Dell TL4000 tape library. A jail on this server copied Bacula backups from disk to tape. In this post: FreeBSD 12.0 Bacula 9.4.3 Dell R720 Investigation As anticipated, I needed to update the server configuration to cope with changed device numbers. The symptoms: when running the update slots command from within bconsole, I was getting this response.

Migrating a Dell TL4000 to a new FreeBSD server and attaching it to a jail Read More »

How allow.mount.zfs affects mountpoints for ZFS

I noticed this the other day, and thought it was interesting. When the jailed property is set on a ZFS fileset, it affects the mountpoint within the jail. If your jail uses allow.mount.zfs (known as allow_mount_zfs when using iocage), the mountpoints become relative to the jail. For example, in my poudriere jail, this is what I see the main dataset: [dan@pkg01:~] $ zfs list tank_fast/poudriere NAME USED AVAIL REFER MOUNTPOINT tank_fast/poudriere 51.1G 452G

How allow.mount.zfs affects mountpoints for ZFS Read More »

Migrating all your iocage jails to a new host

In this post, I’m not exporting an iocage jail to another host. I am moving the entire iocage instance to another host. This is accomplished by doing a zfs export on the zpool, moving the drives to a new system, and doing a zfs import. The drive migration is covered in a previous post. In this post: FreeBSD iocage old host: R710 – r710-01 new host: R720 – r720-01 The first power The

Migrating all your iocage jails to a new host Read More »

scripts for monitoring vulns in FreeBSD jails

I have scripts for monitoring vulns in FreeBSD jails. They use third-party scripts. All I wrote was the Nagios part of the solution. I was preparing slides for my Why I prefer thick jails over thin jails talk at EuroBSDCon 2019. There is still time to register and attend. I was explaining my scripts and was providing links to gist.github.com … I realized I should create a repo: https://github.com/dlangille/freebsd-nagios-jail These scripts do the

scripts for monitoring vulns in FreeBSD jails Read More »

Converting thin jails to thick jails

I have been using ezjail since at least 2008 (see earlier blog post). A few years ago, I started deploying iocage on new servers. About three months ago, I starting converting systems from ezjail to iocage. When I converted my first system, I found that the existing documentation for conversion was incomplete. Specifically, symlinks were a problem. I raised an issue and wrote a better script which I have since used on a

Converting thin jails to thick jails Read More »

Collecting statistics from bind / named

I use bind (Berkeley Internet Name Domain) as my DNS server. I am currently running bind 9.11.5P1 on FreeBSD 11.2-RELEASE-p8 in a jail, with iocage as my jail manager. The OS, jail, and jail manager should play no part in how this works. I have been collecting statistics from bind for some time. I have configured LibreNMS to collect the details via snmpd and they are plotted in a lovely looking graph. The

Collecting statistics from bind / named Read More »

Trying iocage to get an old version of FreeBSD

Sometimes you just need that old version. So I installed it. FreeBSD 9.3 Sorry, but this article is light. I stopped taking notes after a bit…. We created a VM via VMware, put FreeBSD 11.1 on it, over ZFS. Then install iocage. This is what it looked like: What did it just install? This: $ zfs list -r zroot/iocage NAME USED AVAIL REFER MOUNTPOINT zroot/iocage 825M 30.2G 25K /iocage zroot/iocage/download 180M 30.2G 23K

Trying iocage to get an old version of FreeBSD Read More »

Dumping PostgreSQL 9.4 to upgrade to PostgreSQL 9.6

FreeBSD 10.3 & PostgreSQL 9.4 on the old server, and FreeBSD 11.1 & PostgreSQL 9.6 on the new server. As part of the move from the old FreshPorts server (photos) to the new FreshPorts server, I’ll need to dump the database and copy it over. What? No zfs send? There is no ZFS on the old server. The rule of thumb when upgrading a PostgreSQL database is to dump with the pg_dump client

Dumping PostgreSQL 9.4 to upgrade to PostgreSQL 9.6 Read More »

/etc/rc.subr: 1391: Syntax error: “fi”: unexpected

Yesterday, I upgraded a DigitalOcean droplet from FreeBSD 10.3 to FreeBSD 11.1 just before I headed to work. I’ve done such upgrades several times before. They all went well. This one did not. Several issues cascaded to prevent me from completely this task in a timely manner. Let me describe the events as they unfolded. The freebsd-update From memory, because the system is not back online as I type this, the command I

/etc/rc.subr: 1391: Syntax error: “fi”: unexpected Read More »

Scroll to Top