Migrating Linux Raid-Z to FreeNAS?

TheoRK

Cadet
Joined
Jun 7, 2019
Messages
6
Dear Community,

I am fed up with the bad ZFS Support (OpenSuse just broke my access again by updating) and I am currently thinking of moving this whole machine to FreeBSD or FreeNAS.

Xeon E5640 with 24GB of ECC Ram
SSD with 80GB (boot and home)
4x 6TB HDD in one RaidZ pool

FreeNAS with NextCloud seems to be able to do all I need (File storage, Calendars synced with phone, backup space for family photos as well as music and ebooks, backup space for my laptops).

The big question now is: Can I set the ZFS RaidZ drives to "export" and just import them on FreeNAS?

Will the FreeNAS "snapshot" function still work nicely (e.g. onto an attatched external drive) to backup the pool plus the installation on the SSD?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Can I set the ZFS RaidZ drives to "export" and just import them on FreeNAS?
You should be able to do this without a problem.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
I am fed up with the bad ZFS Support (OpenSuse just broke my access again by updating) and I am currently thinking of moving this whole machine to FreeBSD or FreeNAS.
There are a couple things that you need to know, because FreeNAS is an appliance and automates some things in ways that are potentially different from what you might expect. Your 80 GB boot drive, when used in FreeNAS, would only be the boot drive, you can't use it for anything else without some degree of additional trouble and if you do, you run the risk of an update breaking the customization. The /home would need to be somewhere else, like in the storage pool, not on the boot drive. Also, FreeNAS, when it creates a pool, creates two partitions on each storage drive, one for swap space and the other for ZFS. You might need to provide another disk, I used a small SSD, to be the swap space since your pool disks will not be configured with a swap partition. This is not a big issue since FreeNAS rarely uses swap and when it does, it doesn't use much.
Can I set the ZFS RaidZ drives to "export" and just import them on FreeNAS?
I have done this and I had to use a -f to force the import. It initially gave an error that I don't recall exactly but something about the pool being foreign. Once I imported the pool, it worked perfectly.
 

TheoRK

Cadet
Joined
Jun 7, 2019
Messages
6
Good advice about the SWAP, so I need a 2nd small SSD for that (would an SD-card slow it down too much?).
Maybe easier to get the ZFS pool running under Suse again ... still fiddling with combinations of kernel and ZFS to make it work :-( do a fresh backup to a single drive and then give the drives to FreeNAS to do what it likes to do with them?
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Good advice about the SWAP, so I need a 2nd small SSD for that (would an SD-card slow it down too much?).
It would more likely be a question of reliability. I use a mirrored pair of old laptop spinning drives for my boot pool. FreeNAS can create that mirror during the install process using ZFS. Then I use a SSD for my swap because I want it to be fast and reliable. It is using less than 2GB of swap after running for about 78 days since the last reboot.
Maybe easier to get the ZFS pool running under Suse again
FreeNAS was really easy to migrate to and it is very stable, for me, and it is built on FreeBSD Unix, so there are some differences in how things are done vs Linux. If you want to stay in Linux, you might try one of the Long Term Support versions so you are not needing to update often. The rolling releases are too hard to keep working, especially for a package that is added like ZFS on Linux is.
One of the key advantages of FreeBSD / FreeNAS, the ZFS support is native, so there should never be a time when an update breaks the access to the pool. In FreeNAS, the boot pool is ZFS, so breaking ZFS is not something they are going to do.
 

rungekutta

Contributor
Joined
May 11, 2016
Messages
146
If it was me... I personally value the GUI that FreeNAS provides for common (and all of my) control and setup reqs. If not for that, and a more vanilla shell-based setup... I would likely have opted for Ubuntu Linux (LTS). ZFS is native to that distribution too, and with ZFS support in FreeBSD now actually being re-based to the Linux port, the “ZFS is native to FreeBSD” argument becomes a bit weak imho.

https://forums.freebsd.org/threads/freebsd-moving-to-zfs-on-linux.68803/
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
I would likely have opted for Ubuntu Linux (LTS). ZFS is native to that distribution too,
ZFS is not "native" it must be installed after the operating system is installed. I have set that up also. It is not very difficult, but ZFS support in Linux can be broken by an update if you are not very careful about the update process and the boot device should not be on ZFS unless you want to risk loosing access to it. I had to do that at work and it can be a real pain in RedHat Enterprise Linux. I wouldn't wish it on someone that I didn't like, but it was made worse by the fact that our servers are operated in an offline (no internet) mode.
Here is the link on Ubuntu site telling you that ZFS must be installed: https://tutorials.ubuntu.com/tutorial/setup-zfs-storage-pool#0
and: https://tutorials.ubuntu.com/tutorial/setup-zfs-storage-pool#1

This is why I say, even on Ubuntu, it is not native. It is installed after the OS is installed.
being re-based to the Linux port, the “ZFS is native to FreeBSD” argument becomes a bit weak imho.
Re-basing the code that controls the file system is a work-in-progress that may not be completed for some time but it has no relationship to the ZFS support being "native". ZFS support is native to the operating system because it is already present during the OS installation process. This is true of FreeBSD and FreeNAS and you can easily configure your boot device as a ZFS pool. No extra software to install. It is already there.
 
Last edited:

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
I tried ditching Win10 for a Ubuntu workstation a while back.. on ZFS root.

ZFS is not native on Linux..
 

rungekutta

Contributor
Joined
May 11, 2016
Messages
146
Yes you’re right that the Ubuntu installer currently doesn’t support it nor is ZFS officially supported on the root fs. As for native... ZoL is native to that distribution and it’s compiled as a native kernel module (the Linux kernel is modular) so I guess it’s a matter of definition. ;-)

I suspect ZFS will be more naturally integrated already into the installer in the next version but let’s see.

In any case, for now, trivial to do a base install, add ZFS support with a few commands, mount or create your pools and you’re away. As long as you can live with root or boot not being ZFS, for now anyway, and/or without more complicated install.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Last edited:

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
ZoL is native to that distribution and it’s compiled as a native kernel module (the Linux kernel is modular) so I guess it’s a matter of definition. ;-)
Nothing against Linux. I like Linux fine, but details matter to me.
Some Linux fans might want to call ZFS native, but until it is included in the ISO, not installed later, it is not native. If it was NATIVE, it wouldn't need to be installed. That is like NTFS support in RedHat Linux. Most other Linux distributions support NTFS without needing to install some additional software, but on RedHad, you need to connect to a whole different software repository to be able to install NTFS support.
The ZoL software was written specifically and exclusively for use in Linux, and by that measure I suppose it could be called native, but it is not included with the installer for the OS and making the system boot from ZFS is a pain.
re: boot environments. It has existed for Ubuntu MAAS since Oct '18:
From the website you linked:
However, Ubuntu root on ZFS with MAAS is experimental! We encourage users to try this out and report back any issues, but it is not a supported scenario.
 

rungekutta

Contributor
Joined
May 11, 2016
Messages
146
Nothing against Linux. I like Linux fine, but details matter to me.
Some Linux fans might want to call ZFS native, but until it is included in the ISO, not installed later, it is not native. If it was NATIVE, it wouldn't need to be installed.
Then you also know there are lots of Linux distributions, Ubuntu being one. And Ubuntu (as I mentioned as an example above) comes in many different ISOs for different purposes. I don't know if any of them contains the ZFS packages or whether in all cases you need to pull them down from their official repo, for which the command is

sudo apt install zfsutils-linux

and you're done. Also, according to here, the ZFS kernel module is actually already installed in the baseline cases (but all ZFS tools are not) so that messes with your definitions further. ;-)

That is like NTFS support in RedHat Linux. Most other Linux distributions support NTFS without needing to install some additional software, but on RedHad, you need to connect to a whole different software repository to be able to install NTFS support.

No, not at all, and for the reasons you mention yourself. NTFS is not supported by RedHat, you need to install third party libraries. Not even part of the distribution.

The ZoL software was written specifically and exclusively for use in Linux, and by that measure I suppose it could be called native, but it is not included with the installer for the OS and making the system boot from ZFS is a pain.

Except for in Debian, it is. ;-)

In any case. Maybe we can just agree that installer support is evolving, so for now, your options for a 100% ZFS-based install straight from Installer is limited to one or a few distros and not yet part of Ubuntu or RedHat/CentOS.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Maybe we can just agree that installer support is evolving,
One thing remains constant, mostly, things change, even if you don't want them to. It is a difficult task to try to keep up with what has changed and I don't have all the answers. I often need to look things up. Most of my work in Linux is with RedHat because that is what we use at work and installing ZFS on that is a big pain, like installing NTFS support, and the pain is worse because I need to do it with no internet connection. Having things included in the base OS makes my life so much easier, which is the reason I like FreeNAS as much as I do. It can be installed, and run all the functionality I need, with no internet connection. Some things don't work, but all the things I need, are part of the base install.
Except for in Debian, it is. ;-)
I have not loaded Debian on a system since sometime around 1995, or '96. Perhaps I should try it again. I remember it needing a lot of configuration to even get to a working state. Because I work in information systems all day, I tend to want things to just work at home, without needing much configuration or tending.
 

rungekutta

Contributor
Joined
May 11, 2016
Messages
146
I have not loaded Debian on a system since sometime around 1995, or '96. Perhaps I should try it again. I remember it needing a lot of configuration to even get to a working state.
Neither have I but yes, it has probably evolved since then... FreeBSD was what, 2 years old at the time? Anyway I was wrong about the installer; it’s Proxmox VE (a Debian-based distro), not Debian itself, that provides root fs ZFS already from the installer already in current version: https://pve.proxmox.com/wiki/ZFS_on_Linux
 
Top