Upgrading from 11.1-STABLE

Hello,



some few days ago I took over the IT administration of a small company. They have Windows 10, Debian 11 and FreeBSD (the latter on a NAS box).



Obviously since a long time, the former administrator did not update / upgrade FreeBSD on the NAS box. Output of „freebsd-version -ku“ is:



11.1-STABLE
11.1-STABLE

As I am a newbie with respect to FreeBSD, I would like to receive some hints how to upgrade the NAS box to FreeBSD version 13 or even 14. I found a hint in the internet that it is not possible to run freebsd-update on a computer which has a STABLE version installed. Another website wrote that „upgrade“ is possible from an older version but they did not describe how to proceed.



The NAS box has LVM and ZFS implemented. Its sole purpose is to receive backups from Windows workstations (e.g. urbackup) and some major files from the Debian servers.



I would like to minimize the overall downtime of the NAS box as much as possible.

My idea is to perform the upgrade in „small steps“ like

11.1-STABLE to 11.x-STABLE (where „x“ ist the latest subversion)

11.x → 12.1

12.1 → 12.x

12.x → 13.1

13.1 → 13.x

13.1 → 14.1



Please note that

1. I do not insist that the NAS box must have a 13/14.x-STABLE version, it can also be a RELEASE version. What is your recommendation?

2. I would like to run all the required steps via ssh (and VPN), i.e. not being on-site at customer’s premises. Is this possible?



Could you provide some pertinent hints for a smooth upgrade, please?
 
My idea is to perform the upgrade in „small steps“ like
Don't. You wanted the least amount of downtime, then just upgrade right up to 13.2 in one go. And I suggest building from source and upgrade to 13.2-RELEASE (use the releng/13.2 branch). Once you're at a -RELEASE version you can more easily keep the system up to date using freebsd-update(8).

13.1 → 14.1
There is no 14.1 yet, 14.0 hasn't even been release yet. FreeBSD 13.1 will be EoL at the end of July, that's even before 14.0 will be released.

I would like to receive some hints how to upgrade the NAS box to FreeBSD version 13 or even 14.
First make sure you're actually running FreeBSD, not FreeNAS or TrueNAS. The latter are NOT supported here and cannot be upgraded the "FreeBSD way". What does uname -a output?

I do not insist that the NAS box must have a 13/14.x-STABLE version, it can also be a RELEASE version. What is your recommendation?
If it's really FreeBSD (not FreeNAS or TrueNAS), then I would recommend upgrading to 13.2-RELEASE. Use the releng/13.2 branch at checkout.

I would like to run all the required steps via ssh (and VPN), i.e. not being on-site at customer’s premises. Is this possible?
Yes, if you're careful enough, done this a million times myself. Make sure you have some sort of emergency console access though, things could go wrong and you could be stuck locking yourself out.

Essentially:
Code:
rm -f /etc/make.conf /etc/src.conf #(you don't want any customization)
etcupdate extract
git clone -b releng/13.2 https://git.freebsd.org/src.git /usr/src
cd /usr/src
make -j 8 buildworld buildkernel # increase -j to the number of cores the machine has
make installkernel
make installworld
etcupdate -B
make -DBATCH_DELETE_OLD_FILES delete-old
make -DBATCH_DELETE_OLD_FILES delete-old-libs
pkg bootstrap -f
pkg upgrade
shutdown -r now # hope the machine comes back up
 
If the machine runs ZFS, I would recommend to install into a boot environment, so you have a simple rollback in case anything goes wrong. To do that, create one e.g. like this and mount it:
Code:
bectl create 13.2
bectl mount 13.2 /mnt

Then, add DESTDIR=/mnt to the install* and delete-old* steps. You could even do it all in a single command like make DESTDIR=/mnt BATCH_DELETE_OLD_FILES=yes installkernel installworld delete-old delete-old-libs.

Also add -D /mnt to the etcupdate command.

When done, unmount and activate the new BE:
Code:
bectl umount 13.2
bectl activate -t 13.2

The -t flag only activates it temporarily, for the next boot. So in case of any issue, just reboot again to get back to 11. Advantage here is that the upgrade does NOT happen in the live system ?

When everything is fine, you can activate that BE (and maybe rename it to default)
 
# uname -a
FreeBSD nas1.abc.loc 11.1-STABLE FreeBSD 11.1-STABLE #0 r321665+6bdfda58b62(HEAD): Thu Dec 20 14:27:36 EST 2018 root@mp19.lab.ixsystems.com:/freenas-releng-final/fr
eenas/_BE/objs/freenas-releng-final/freenas/_BE/os/sys/FreeNAS.amd64 amd64

Note:
In the output of "uname -a" I changed the hostname of the NAS box to "abc".

The output shows both "FreeBSD" and ""freenas". It seems that I (as a newbie) am lost ;-)
 
That is a freenas. Sorry, that means we can't do much here.
 
Just a quick hint, it seems FreeNAS is now called "TrueNAS Core", so best look for upgrade information to that.

Although I would assume the recommended procedure to be quite similar (with the obvious difference of pulling some TrueNAS source), I can't really know it and almost nobody on these forums can because we don't use TrueNAS ... and a wrong assumption could quickly become dangerous ?. So, best luck to find reliable instructions, e.g. on some TrueNAS forum!
 
The biggest stumbling block for me would be Samba. I took a look at what it would take to set that up on my Freebsd server and had to naw dawg that noise.
I have samba on FreeBSD running on quite a few hosts, on most of them just for winbind (so they can use it for PAM and NSS as an AD domain member). Then there's one machine acting as a file server offering SMB shares with AD authentication, this is probably what you'd want for a NAS. And finally, there's one machine acting as the AD DC. This was the only one where I had issues on setup, I needed to apply quite some black magic voodoo whatever to "provision" that domain. IIRC, this was all about extended attributes on ZFS, and I found quite some suggestions to just use UFS (possibly in a zvol) for the domain's "SYSVOL", but I stubbornly refused to do *that* ?

So, in a nutshell, in my experience, if you need samba on FreeBSD for anything else than the domain controller itself, it *should* be pretty painless to setup....
 
So, in a nutshell, in my experience, if you need samba on FreeBSD for anything else than the domain controller itself, it *should* be pretty painless to setup....
Hm, you said "...(a) machine acting as a file server offering SMB shares with AD authentication, this is probably what you'd want for a NAS..." but also that you had "issues on setup" and that you "needed to apply quite some black magic voodoo" to set up the Active Directory Domain Controller. You can't have the file server without the controller so... black magic required.

Unless you're suggesting a Windows DC somewhere on the same network.
 
Off the wall suggestion: This machine is probably pretty old. Finding a physical replacement for it is probably relatively easy and cheap. So set up a brand-new machine, either using vanilla FreeBSD (current release version), or whatever TrueNAS is called right now. Play with the new machine a little bit, learn how to configure and upgrade it, learn how to transfer whatever configuration was on the old box to the new box. Only after you're really comfortable with installing, upgrading and administering the new box, transfer the data over. This minimizes the downtime for users, allows you to make mistakes, makes the whole process more comfortable, and creates new skills and knowledge. The obvious downside is: It will take much more time.
 
Hm, you said "...(a) machine acting as a file server offering SMB shares with AD authentication, this is probably what you'd want for a NAS..." but also that you had "issues on setup" and that you "needed to apply quite some black magic voodoo" to set up the Active Directory Domain Controller. You can't have the file server without the controller so... black magic required.

Unless you're suggesting a Windows DC somewhere on the same network.
Uhm. If you need your NAS to "speak SMB" at all, I assume you have Windows machines in your network. For a small network, you might also do fine without a DC. Otherwise, operating the DC is not in the scope of the NAS, that's what I meant. So sure, having a Windows DC is most likely a pretty common scenario ?
 
Well, I don't, and I don't plan on having one. Maybe I'm alone on this. NFSv3 auth is a joke, and I could not get NFSv4/Kerberos working, so I looked at setting up Samba. Macs also use SMB for Timemachine backups, for example.

The sad state of affairs is that SMB is the lowest common denominator, even for unixy machines.
 
The sad state of affairs is that SMB is the lowest common denominator, even for unixy machines.
The *real* sad state is that it's practically unusable for a FreeBSD client, as only SMBv1 is supported, which you *really* should not use.
 
Back
Top