Although I have been a Linux person since 1995, I have come to like FreeBSD a lot. Primarily because two of my major systems are based on it. As my firewall I have been using pfSense for a number of years, and for storage it is FreeNAS. And both have never let me down, neither in terms of stability nor regarding their functionality.
Now the company behind FreeNAS (iXsystems) has announced a while ago, that they will move to Linux as the underlying operating system for their future core product. I am not sure I welcome this change that much. I can understand that simply for available know-how iXsystems want to do this switch. Plus the hardware vendor support is obviously broader and the community also does their part in testing. But, with some level of exaggeration, Linux (not the kernel but adjacent things like
While there is merit to improving things, stability is often more important. And stability not only means that things work as expected. But also the rate of change is a factor. If a new framework saves me 20% development time that sounds great. But in the enterprise evolution, and by that investment protection, is typically what gets you the much better ROI. Because the 20% development improvement are more than eaten up by effort in other areas (esp. operations).
As part of moving to a new FreeNAS box, I want to replicate data from the old (nas2, running FreeNAS 11.1 U7) to the new (nas3, running FreeNAS 11.3 U5) machine. During the initial phase nas2 will still be my primary storage location. Think of this as something like a burn-in to ensure that there are no dead-on-arrival components in the new box, esp. hard disks of course. This is planned to last for at least two months and I want all my data synchronized constantly.
The solution I laid my eyes on is Syncthing and I want to run it in a FreeNAS jail on both systems. On the new system the installation was smooth, but on nas2 it was not possible to even create a jail. It turned out to be a setting that had not been migrated from the original FreeNAS 9.3 installation, which had been the initial version of FreeNAS on nas2.
All that had to be done was fix the “Collection URL” setting in the jails configuration as shown below.
- Go to “Jails / Configuration”
- Switch to “Advanced Mode”
- Make sure that the URL contains “11.1” (was “9.3” before on my system)
The next step was to install Syncthing with
pkg. The problem with FreeNAS 11.1 is that the underlying FreeBSD is no longer maintained (EOL) and therefore no package repository exists for this version. The workaround is to forcibly switch to an existing repository, even if it does not match the FreeBSD version. I am ok with that, as long as only applications and not OS tools are installed (you should carefully think, whether this is also ok for you!). To do this, issue the following command:
# pkg bootstrap -f
You will get a warning about different OS versions and need to confirm that you want to continue. Once this is complete, install Syncthing with
pkg install syncthing
You get the same warning as just before and need to confirm the installation.
[syncthing] [1/1] Fetching syncthing-1.10.0.txz: 99% 16 MiB 1.0MB/s 00:0
[syncthing] [1/1] Fetching syncthing-1.10.0.txz: 100% 16 MiB 1.0MB/s 00:1
Checking integrity... done (0 conflicting)
[syncthing] [1/1] Installing syncthing-1.10.0...
===> Creating groups.
Creating group 'syncthing' with gid '983'.
===> Creating users
Creating user 'syncthing' with uid '983'.
===> Creating homedir(s)
[syncthing] [1/1] Extracting syncthing-1.10.0: 100%
From here, you can just continue with the normal process of setting thins up. A good starting point might be the following YouTube video.
I have been an extremely satisfied user of FreeNAS for many years, but had not updated my system for quite a while. Having a free Sunday was the perfect opportunity to do just that.
There were two steps involved: First go to 9.3.1 and then to 9.10.2-U2. As my box sits in the basement and is headless, I opted for update via GUI and it went extremely well.
The only issue was that on 9.10.2 the jail template list was empty. A quick online search revealed that this was, unfortunately, expected. But on the other hand, in such a case there is a good chance, that someone else has already found a solution.
But it all proved a bit more challenging than expected. And nothing I found worked completely. So I ended up with a combination of things from other people (in particular this link) and my own discoveries:
- I deleted the ZFS volume
.warden-template-standard via the web UI
- Then from the command line the ZFS was re-created with
zfs create zpool/jails/.warden-template-standard
- Deleted the template
warden template delete standard
- Re-created the standard template
warden template create -nick standard -tar http://download.freenas.org/jails/10/x64/freenas-standard-10.3-RELEASE.tgz
At this point everything should have been good – but it was not. Still no template showed up when I tried to create a new jail. So I added a jail template in the web UI, too.
The URL is exactly the same as for the command line above.
With this I was able to create a new FreeBSD jail.