Architect Testing has ZFS and SPL kernel extensions

Hey,

so I've been strugging with some Arch installs with ZFS on root - got CentOS 1708 zroot working, but Arch is new for me and I haven't quite mastered the install process yet ... there are wrappers to rebuild the archiso image with ZFS support I was going to try, but I thought I'd take a break from it and check out Manjaro Architect because I used to use Manjaro a couple years ago and I wanted to see what they were up to these days.

Anywho, ZFS isn't a file system option, but after you go through the base install process you can modify your kernel with extra flags. That's when I was there are ZFS and SPL flags available, so theoretically it should be pretty easy to install ZFS after that, using the first install as a launchpad and put your zpool on a different partion, either re-bootstrap or rsync the file system / userland over to it... (that's what I did in CentOS anyway...)

I was hoping I could use the bootstrapper with Archiso on ZFS root from a fresh install but they don't really make it that easy to get the tools to use to bootstrap/chroot once you get the first install completed - you have to wrap a whole 'nother ISO to get the tools. Oh well, I'll get it eventually ...

so blah blah, just wanted to let people know it's getting close to basically including the ZFS filesystem. Has anyone managed to get a zroot working with it yet?

cheers

edit: jeesh, sorry about the stream of consciousness blab, I've literally been up for two days trying to get this Arch zroot install working ... I'm losing it...

may be read this topic

That link has good data on subject.

Basically, mount your partitions manually and then go to the installation phase. There is no support for zfs yet. Zfs kernel module is available because all modules are.

Newb Question: What the difference between ZFS and ext4???

  1. zfs is made for bsd and not linux
  2. zfs has different open source license which prevents it from being merged into Linux kernel
  3. ext4 has better performance for desktop, zfs has more features
  4. zfs has compression, snapshots, subvolumes and can span multiple physical devices, which makes it attractive for servers that have dozens of hard drives connected into them. It's like ext4+luks,
  5. zfs has raid capabilities, which minimize data corruption.
  6. zfs has big ram requirements

On Linux, you can get most of the interesting features of zfs with less hassle by using btrfs, which is mostly modern zfs clone made specifically for linux (and fully supported by manjaro-architect). The reason someone might still want zfs is that it is tried and true filesystem known for its stability, while btrfs is still a bit of a newcomer. But arguably the compatibility problems on linux lessen the stability advantage it has.

1 Like

...and that is becoming slightly less "arguable":


:wink:

1 Like

@scjet ,there is two arguments for redhat
1 - Btrfs multi disks Raid is very low and Btrfs Repair is far to be solid ( 15 steps with opensuse )
2 - there are no dev on btrfs , they uses only xfs and they go back with xfs

1 Like

ZFS was developed by Sun Microsystems for the Solaris operating system, not FreeBSD. The original and currently developed ZFS branch is still closed source and developed by Oracle who acquired Sun nearly a decade ago. It has diverged quite a bit from the project that was open-sourced for OpenSolaris around 2009, which is a fork of the original closed-source ZFS that has been ported to any other OS. The project is called OpenZFS, and the project that diverged from that for adaptation to Linux OS is called ZFS on Linux (or ZOL).

FreeBSD just had one of the first development teams that recognized the significance of OpenZFS fork and jumped to port it to their OS when OpenZFS was released under the CDDL. BSD also is released under the BSD license, which is more compatible with CDDL since you can essentially do anything you want with software released under BSD license, unlike GNU, which requires that software released under GNU license remain free and open-source (for example, Apple Darwin is a fork of BSD which has been made closed-source and is now sold for profit).

Here's more about why GNU licenses and CDDL licenses are supposedly incompatible (I don't really see it, personally, but it's apparently a big argument): https://www.whitesourcesoftware.com/whitesource-blog/top-10-cddl-license-questions-answered/ )

I think what it's basically saying is if you distribute something under GNU you can't release portions of it under CDDL, but if you have something that's CDDL it has to remain CDDL so it can't be included under GNU.

At the end of the day, I don't think anyone really cares other than lawyers or developers, and when software is free there's not a lot of desire to get involved in lawsuits, so let's start bucking the trend and distributing copies that are easier for people to start using this technology. I'm neither, and I imagine I'm not alone that all this licensing stuff makes my eyes glaze over when I just want the best-working system technologies. ZFS is hands-down the best file-system / raid / memory caching software I've ever used and once you get it in there, it's dead-simple to use.

I used a wrapper from this github site to make an ArchISO install disk that worked fine: https://github.com/stevleibelt/arch-linux-live-cd-iso-with-zfs

you need to add this repo to your /etc/pacman.conf file:

Maintainer: Jesus Alvarez (demizer)
Description: Packages for ZFS on Arch Linux.
Upstream page: https://github.com/archzfs/archzfs
Key-ID: 5E1ABF240EE7A126
[archzfs]
Server = http://archzfs.com/$repo/x86_64
from here: https://wiki.archlinux.org/index.php/unofficial_user_repositories#archzfs and here: https://wiki.archlinux.org/index.php/unofficial_user_repositories#archzfs

I had to put SigLevel = Never under the [archzfs] line because I had problems importing this repo's key using pacman-key -r (feel free to correct me if I did that wrong).

More about pacman here: https://wiki.archlinux.org/index.php/Pacman/Package_signing

I kind of recommend people start out just having secondary storage with ZFS and not use ZFS for root though. Although it's cool to have ZFS-style snapshots for OS configuration changes and the memory caching, etc. you can at least do the snapshots with BTRFS for your root and it's a lot easier to get working properly.

Re: File system stability, I've never had any issues with BTRFS, I think it's perfectly fine for any general end user, it's when you get into enterprise stuff it gets called into question... A lot of the reasons for its reputation of corrupting files, etc. have been dealt with, it's just still fresh in people's minds because its only 6-7 years old. Conversely, I've had no issues with stability with ZFS on Linux once I get up and running, it's just really hard to get it on the root filesystem. It's dead-easy for FreeBSD because they build it into the installer, but BSD's userland is kind of ■■■■■■ compared to Linux. So the struggle continues.

Even using this wrapped archISO with zfs, when I was trying to set up the root partition I managed to ■■■■■ my grub following the same guide I used for zroot CentOS on GitHub (I think part of it was just that I was tired...). For some reason I am just driven by trying to get this stuff right even though it doesn't really serve any real purpose other than self-aggrandizement and sense of achievement, and after 2-3 days (literally) of struggling to get working, I am starting to really question if its worth it... Maybe it'll be easier for someone else...

Here's the guide for CentOS ZFS on root: https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-install-EL7-(CentOS-RHEL)-to-a-Native-ZFS-Root-Filesystem

But the Debian/Ubuntu one is probably more up to date (I just had already done the CentOS one so I wanted something I was familiar with) https://github.com/zfsonlinux/zfs/wiki/Ubuntu-16.04-Root-on-ZFS

Someone take over for me. I'm going back to sleep...

2 Likes

Interesting read,

but I honestly thought this whole CDDL compatability with GPL lawyers stuff was put to rest when Ubuntu finally "... used ZFS as binary kernel module in Linux. ...In April 2016, the Ubuntu 16.04 LTS release included the CDDL-licensed ZFS on Linux, ..."
excerpt from: https://en.wikipedia.org/wiki/Common_Development_and_Distribution_License#CDDL.27d_ZFS_into_GPL.27d_Linux_kernel

aka, No Harm, so no Foul.

But then, since I'm not a lawyer, my hypothesis is probaly full of holes, like swiss chesse. :wink:
anyway, there'll always be a FreeNAS out there.

?
Your wrong there, in fact, it has a real purpose, as you mentioned later, for your "sense of achievement,", as well as, it helps other struggling with this, and a million other good reasons. :muscle: :ok_hand:

Oh, that's a cool article. I liked the part where it said, "Others followed Ubuntu's conclusion, for instance lawyer James E. J. Bottomley argued there can't be "a convincing theory of harm" developed, making it impossible to bring the case to court." ;old-timey gangster voice; Soooo... yah got no standing, ay? Whattagonnadoabouit?

Yeah, it's pretty fun stuff to learn about but after struggling to get ZFS on root for 2-3 days, I started wanting to be able to just use a system again. The real goal of having a nice, stable, easy to snapshot file system had still not been realized and I was starting to lose interest.

I really liked Arch but it seemed to be kind of buggy and unrefined, and the install process - jeez, working through issues is fun the first few times (maybe). After doing the same install 8-9 times and running into weird different problems each and every time it starts to get tiresome.

And I think I know where I went wrong - I think I forgot, or wasn't able to, assign the zpool name as the / mount point, or maybe it needed a separate dataset for the / mountpoint. But the system would likely have to be reinstalled again to even be able to test the theory. As much as I want to finally get it, it just seemed less and less worth it when it takes at least an hour of labor just to get it installed.

There's an interesting post about Arch Linux regarding that topic here, actually: https://www.dedoimedo.com/computers/why-not-arch-linux.html it's really thought-provoking.

The good thing that came of all of it is, when I was researching for my Arch ZFS build, I read where someone on this forum made a small one-line aside that Antegros has ZFS in its installer. So I decided to check it out. It does. And it works.

It's in the full live ISO, but not the minimal one. I have done it twice now since the first install grub wouldn't load the grub.cfg. I had edited the settings in the installer for ZFS, so I left them stock the second time and it didn't boot at first, but then zpool import -f poolname worked before a kernel panic that resulted in a working rebooted system. If anyone here ever tries to install it, make sure you # zpool export poolname before rebooting because the error has to do with the zpool being imported on another machine (ie, your installer ISO). I think that ought to clear it up.

I do believe once people catch on they'll start flocking to Antergos, since I can't think of another distro (yet) that offers zfs in the installer process. It has nice customized desktops in it's little repo, too (it mainly uses straight Arch repos), and simple-to-install package bundles (pacman -S zfs anyone?).

Thanks Manjaro, for introducing me years ago to the bleeding-edge world of rolling Arch distros. It's definitely been a blast. Now put ZFS in your installer, already. :wink:

I thought Ubuntu did, but I may be wrong.

Gladly, just send a pull request and I will :wink:

Zfs would be cool, especially with lumina desktop, because it's filemanager has that time slider for zfs.

1 Like

yes Ubuntu did

but they use a special branch for that
see bootstrap-zfs and grub-zfs and kernel-zfs

https://www.youtube.com/watch?v=O_X01koV8rk

So, in the end what's the best way to an Manjaro install on a zfsroot with luks encryption ? Following the arch Linux wiki page ?

Mostly yes. Prepare and mount partitions manually, use manjaro-architect to install, add missing packages and adjust fstab and mkinitcpio.conf as needed.

oh yeah! Timeslider is from Solaris, it's the best! I wish Solarish distros hadn't practically died, they were awesome but they're hardly being developed anymore ... it's all about Linux these days.

I tried to build time slider in Arch but I couldn't wrap my head around it. It's programmed primarily in Py2 though so it shouldn't be too hard for someone who knows what they're doing

I'm using znapzend from the AUR

SideRant: Oracle fired over half their Solaris developers last year and is killing off the Sparc processor slowly. I wonder if we could convince them to open-source everything once it's no longer of financial interest to them ... petition?

Ack. I did not see your response until now. How do I create a pull request?

I'm trying to read this tutorial about it but I don't really understand it. I can't even get VS Code to work with my GitHub account. I'm useless! Bah!

The easiest way to is to go to the file that you wish to edit and press the edit button (looks like a pencil) (in the browser interface, in the repo you want to send the pull request to). It gives you a message that you don't have write access, so it makes your commit into a pull request.

Forum kindly sponsored by