Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zfs build for fedora 35 #12667

Closed
KoykL opened this issue Oct 21, 2021 · 52 comments
Closed

zfs build for fedora 35 #12667

KoykL opened this issue Oct 21, 2021 · 52 comments
Assignees
Labels
Component: Packaging custom packages

Comments

@KoykL
Copy link

KoykL commented Oct 21, 2021

System information

Type Version/Name
Distribution Name fedora
Distribution Version 35
Kernel Version 5.14.10-300.fc35.x86_64
Architecture x86_64
OpenZFS Version 2.1.1

Describe the problem you're observing

There is no zfs build for fedora 35 on download.zfsonlinux.org.

Describe how to reproduce the problem

Install zfs repo on fedora 35. Download of repo metadata will fail due to lack of zfs build for fedora 35.

Include any warning/errors/backtraces from the system logs

Errors during downloading metadata for repository 'zfs':
  - Status code: 403 for http://download.zfsonlinux.org/fedora/35/x86_64/repodata/repomd.xml 
Error: Failed to download metadata for repo 'zfs': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
@KoykL KoykL added the Type: Defect Incorrect behavior (e.g. crash, hang) label Oct 21, 2021
@behlendorf behlendorf added Component: Packaging custom packages and removed Type: Defect Incorrect behavior (e.g. crash, hang) labels Oct 21, 2021
@tonyhutter tonyhutter self-assigned this Oct 21, 2021
@tonyhutter
Copy link
Contributor

tonyhutter commented Oct 21, 2021

I'll package it up. F35 should be released any day now.

@tonyhutter
Copy link
Contributor

I'm currently waiting on the official Fedora 35 AMIs to be released so I can build the packages.

@rincebrain
Copy link
Contributor

rincebrain commented Oct 22, 2021

Good news, it's partly broken on F35 right now due to needing #12636/#12638.

(--enable-debug builds are also broken due to needing at least 6954c22, though it doesn't apply super cleanly... rincebrain@8abfddb is my pass at doing it, and it did build with debug after.)

@KoykL
Copy link
Author

KoykL commented Oct 22, 2021

As a side note, I am currently using f34 build on f35 as a workaround.

@tonyhutter
Copy link
Contributor

@Rudd-O
Copy link
Contributor

Rudd-O commented Nov 1, 2021

F35 is still failing with the same error:

DEBUG: checking for python extension module directory... ${exec_prefix}/lib64/python3.10/site-packages
DEBUG: configure: error: "Python >= 3.4 is required"
DEBUG: error: Bad exit status from /var/tmp/rpm-tmp.zFmFJa (%build)
DEBUG:     line 129: It's not recommended to have unversioned Obsoletes: Obsoletes:      spl
DEBUG:     line 173: It's not recommended to have unversioned Obsoletes: Obsoletes:      libzpool2
DEBUG:     line 174: It's not recommended to have unversioned Obsoletes: Obsoletes:      libzpool4
DEBUG:     line 190: It's not recommended to have unversioned Obsoletes: Obsoletes:      libnvpair1
DEBUG:     line 208: It's not recommended to have unversioned Obsoletes: Obsoletes:      libuutil1
DEBUG:     line 234: It's not recommended to have unversioned Obsoletes: Obsoletes:      libzfs2
DEBUG:     line 235: It's not recommended to have unversioned Obsoletes: Obsoletes:      libzfs4
DEBUG:     line 257: It's not recommended to have unversioned Obsoletes: Obsoletes:      zfs-devel
DEBUG:     line 258: It's not recommended to have unversioned Obsoletes: Obsoletes:      libzfs2-devel
DEBUG:     line 259: It's not recommended to have unversioned Obsoletes: Obsoletes:      libzfs4-devel
DEBUG:     Bad exit status from /var/tmp/rpm-tmp.zFmFJa (%build)

I understand there is a fix in progress, just wanted to give a heads up.

@Rudd-O
Copy link
Contributor

Rudd-O commented Nov 1, 2021

Context for probably necessary fix:

#12638

It's not passing tests ATM.

@rincebrain
Copy link
Contributor

Oh, don't worry, the CI continuously fails for everything these days. :D

@tonyhutter
Copy link
Contributor

So as you may have surmised, it looks like we're going to have to roll new 2.1.2 and 2.0.7 releases to build on F35. For 2.1.2, we'll need #12671 and #12700, which look pretty much read to go. For 2.0.7, the zfs-2.0.7-staging branch already builds under F35. We'll need to take those commits and make sure they pass the test suite on F35 before we can do the release.

@rincebrain
Copy link
Contributor

Sorry, which commits? #12671? #12700? #12638?

I wasn't kidding about my remark - last I looked, the test suite was just flakier than a butter flake roll.

@Rudd-O
Copy link
Contributor

Rudd-O commented Nov 2, 2021

If the tests are flaky, then perhaps there should be a pause to fix the tests. It's always been a point of confidence that ZFS was well-tested.

@Rudd-O
Copy link
Contributor

Rudd-O commented Nov 2, 2021

Seem like important tests to have pass:

Tests with results other than PASS that are unexpected:
    FAIL cli_root/zfs_destroy/zfs_destroy_003_pos (expected PASS)
    FAIL cli_root/zfs_destroy/zfs_destroy_004_pos (expected PASS)
    FAIL cli_root/zfs_destroy/zfs_destroy_008_pos (expected PASS)
    FAIL cli_root/zfs_destroy/zfs_destroy_009_pos (expected PASS)
    FAIL cli_root/zfs_destroy/zfs_destroy_010_pos (expected PASS)
    FAIL cli_root/zfs_destroy/zfs_destroy_011_pos (expected PASS)
    FAIL cli_root/zfs_destroy/zfs_destroy_012_pos (expected PASS)
    FAIL cli_root/zfs_destroy/zfs_destroy_013_neg (expected PASS)
    FAIL cli_root/zfs_load-key/zfs_load-key_all (expected PASS)
    FAIL cli_root/zfs_receive/zfs_receive_002_pos (expected PASS)
    FAIL cli_root/zfs_receive/zfs_receive_005_neg (expected PASS)
    FAIL cli_root/zfs_unload-key/zfs_unload-key_all (expected PASS)
    FAIL cli_root/zfs_unmount/zfs_unmount_008_neg (expected PASS)
    FAIL cli_root/zfs_upgrade/zfs_upgrade_001_pos (expected PASS)
    FAIL cli_root/zpool_destroy/zpool_destroy_001_pos (expected PASS)
    FAIL cli_root/zpool_detach/setup (expected PASS)
    SKIP cli_root/zpool_detach/zpool_detach_001_neg (expected PASS)
    FAIL reservation/reservation_005_pos (expected PASS)
    FAIL reservation/reservation_007_pos (expected PASS)
    FAIL reservation/reservation_014_pos (expected PASS)
    FAIL snapused/snapused_002_pos (expected PASS)
    FAIL snapused/snapused_005_pos (expected PASS)

Seems important that the log be available to diagnose wth happened -- but I can't seem to get the logs from CI, and CI doesn't tell us where the logs are posted after done. There should at least be a link to where the CI artifacts are posted.

@Rudd-O

This comment has been minimized.

@Rudd-O

This comment has been minimized.

@Rudd-O

This comment has been minimized.

@Rudd-O

This comment has been minimized.

@Rudd-O

This comment has been minimized.

@rincebrain
Copy link
Contributor

Like I remarked on the PR, 2.1.2-staging doesn't have the ZTS fixes needed for a lot of tests to not spuriously fail merged, so even rebased against that, it's gonna fail.

@andrewgdunn
Copy link

andrewgdunn commented Nov 2, 2021

As @KoykL pointed out, F34 builds work:

dnf install -y https://zfsonlinux.org/fedora/zfs-release.fc34.noarch.rpm

vim /etc/yum.repos.d/zfs.repo

[zfs]
name=ZFS on Linux for Fedora $releasever
baseurl=http://download.zfsonlinux.org/fedora/34/$basearch/
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-zfsonlinux

Install, use like usual, seems to work just fine. I've done this in previous releases to "tide me over" until the proper release gets worked out. Hopefully posting how to do this doesn't create more people submitting issues.

@Rudd-O
Copy link
Contributor

Rudd-O commented Nov 4, 2021

This is about F35 @storrgie .

@zssfred
Copy link

zssfred commented Nov 4, 2021

This is about F35 @storrgie .

It is just a temp workaround before the official release for F35

@martin-schlossarek
Copy link

Any news about this?

@scofieldbrks
Copy link

Seriously, Can ZFS work across Distro upgrades? This is so annoying. ZFS works great on Linux Mint now; previously LM sucked for ZFS, but worked well on Fedora. Now the reverse is true. It should work well like Chrome, Brave Browser, GIMP, Thunderbird, GNOME Disks, etc.

@Evernow

This comment has been minimized.

@scofieldbrks

This comment has been minimized.

@scofieldbrks

This comment has been minimized.

@scofieldbrks

This comment has been minimized.

@raindev

This comment has been minimized.

@almereyda

This comment has been minimized.

@scofieldbrks

This comment has been minimized.

@scofieldbrks

This comment has been minimized.

@ahrens
Copy link
Member

ahrens commented Nov 17, 2021

It looks like @tonyhutter was/is working on this. Please use comments on this issue to help accomplish that. Off-topic or unhelpful comments will be hidden.

@catull
Copy link

catull commented Nov 21, 2021

Have to disagree with @scofieldbrks

I did a fresh install of Fedora 34, following this guide to the letter, almost.

After the reboot I had a working Fedora 34 on ZFS.
Then I performed a standard upgrade to Fedora 35 from CLI, it went through without a problem.

I have been using it for over a week now.
I can create, import, export and destroy zpool resources; mount and unmount zfs file system as well.

@outofforest
Copy link
Contributor

Is there any ETA for this?

@taoeffect
Copy link

taoeffect commented Dec 3, 2021

@storrgie wrote:

As @KoykL pointed out, F34 builds work:

I tried doing that but dnf install -y kernel-devel zfs && modprobe zfs errored out with:

modprobe: FATAL: Module zfs not found in directory /lib/modules/5.15.6-200.fc35.x86_64

Not sure what to do. Any tips appreciated!

EDIT: nevermind: per this comment I ran dkms install zfs/2.1.1 and then modprobe zfs and it worked!

@gogi983
Copy link

gogi983 commented Dec 3, 2021

@storrgie wrote:

As @KoykL pointed out, F34 builds work:

I tried doing that but dnf install -y kernel-devel zfs && modprobe zfs errored out with:

modprobe: FATAL: Module zfs not found in directory /lib/modules/5.15.6-200.fc35.x86_64

Not sure what to do. Any tips appreciated!

EDIT: nevermind: per this comment I ran dkms install zfs/2.1.1 and then modprobe zfs and it worked!

Are you arguing that zfs/2.1.1 is compiling zfs modules with 5.15.6 kernel for you?
Because I'm stuck here with kernel update to 5.15.4, since upgrade is proposing me to remove zfs packages as following :

`

Paquet Architecture Version Dépôt Taille

Install:
kernel-core x86_64 5.15.6-100.fc34 updates 35 M
kernel-devel x86_64 5.15.6-100.fc34 updates 15 M
kernel-modules x86_64 5.15.6-100.fc34 updates 32 M
Install dependencies:
zfs-fuse x86_64 0.7.2.2-18.fc34 fedora 1.5 M
Remove:
kernel-core x86_64 5.14.18-200.fc34 @updates 76 M
kernel-devel x86_64 5.14.18-200.fc34 @updates 60 M
kernel-modules x86_64 5.14.18-200.fc34 @updates 31 M
Remove dependencies :
zfs x86_64 2.1.1-1.fc34 @zfs 1.6 M
zfs-dracut noarch 2.1.1-1.fc34 @zfs 39 k
Downgrade :
zfs-dkms noarch 2.0.4-1.fc34 zfs 8.6 M

Résumé de la transaction

Installer 4 Paquets
Supprimer 5 Paquets
Retrograder 1 Paquet
`

@taoeffect
Copy link

taoeffect commented Dec 3, 2021

@gogi983 On a fresh Fedora 35 install I got it to work with a combination of @storrgie's comment above and this comment.

I think my process went something like this:

dnf upgrade -y --refresh
# Edit /etc/yum.repos.d/zfs.repo per comment
dnf install -y http://download.zfsonlinux.org/fedora/zfs-release34.noarch.rpm
gpg --import /etc/pki/rpm-gpg/RPM-GPG-KEY-zfsonlinux && gpg --list-keys C93AFFFD9F3F7B03C310CEB6A9D5A1C0F14AB620
echo "options zfs zfs_arc_max=268435456" >> /etc/modprobe.d/zfs.conf
echo "zfs" >> /etc/modules
dnf install -y kernel-devel zfs
dkms install zfs/2.1.1
modprobe zfs
dkms status

@Moerten85
Copy link

Moerten85 commented Dec 4, 2021

Hi, we have December now (only to remember) and it is still not possible to install ZFS on Fedora 35. One of the mostly used Linux distributions of the world. I don't want to complain for a product I can use for free but to be honest it's a shame ZFS doesn't work since weeks. I thought ZFS is a professional and reliable solution and not a product of hobby programmers.

Luckily I had still ZFS 2.1.1 installed on my maschine when I upgraded to Fedora 35, but after the kernel update yesterday there was zfs-fuse updated also what dropped the ZFS 2.1.1 stuff from my maschine finally. Stupidly I installed the kernel update not thinking about the consequences. Now I can't access my ZFS raid and ZFS backups anymore. And all the hacks to install the Fedora 34's repository doesn't succeed also because the hole thing is broken. There would already exist an folder for ZFS 2.1.1 in the kernel path which makes some post scripts fail and so on. So I will try an clean Fedora install now at a last chance...

But in case the clean install and Fedora 34's repository hacks will fail also. Can I assume there will be a Fedora 35 ZFS repository available in the next days, weeks or will it take months? So at least give some information so that I can take a decicion on how to go on for being able to access my data again.

@ahrens
Instead of deleting comments here use your resources in a productive way with supporting tony hutter making the ZFS 2.1.2 build available in time. Thanks.

Additonal bug:
If you do a clean Fedora install after 4-5 kernel updates the automatic ZFS build doesn't work anymore (I have reproduced this with 4 new clean installs in the meanwhile). So from now on you have to build ZFS on your own after each kernel update what happens 2-3 times a week at the moment. Please could you investigate why the automatic builds are not processed anymore after some time.

@mskarbek
Copy link
Contributor

mskarbek commented Dec 4, 2021

I thought ZFS is a professional and reliable solution and not a product of hobby programmers.

It is, and as such works perfectly well in professional use cases. There is no Issue with RHEL.
Fedora is wonderful and my daily driver but has a different purpose.

Stupidly I installed the kernel update not thinking about the consequences.

It's a "you" problem, not an OpenZFS problem. Release notes clearly state on which kernels OpenZFS will work, so if you go beyond that on your own, you can't blame OpenZFS for not working anymore.
If you want to free yourself from that responsibility, try something like this: https://github.com/zeet-cc/zfs-rpms/blob/main/kernel-zfs.spec. This package will prevent kernel updates without corresponding kmod packages.

Can I assume there will be a Fedora 35 ZFS repository available in the next days, weeks or will it take months?

It will be available whenever work on zfs-2.1.2-staging branch will be finished.

@ahrens Instead of deleting comments here use your resources in a productive way with supporting tony hutter making the ZFS 2.1.2 build available in time. Thanks.

Why not donate to provide such resources in the first place? https://www.spi-inc.org/projects/openzfs/

@ikozhukhov
Copy link
Contributor

OpenZFS - it is Open project for everyone.
if it is not working for your own distribution and your own preferences - just fix it and contribute updates.
or try to use tested distributions what are using for development and testing.
not anyone should work for your preferences and you just complain what should be done for you.
for example: i have my own distribution is DilOS and porting updates to it by myself.
sorry for my reply, but just wanted to add comment.

@catull
Copy link

catull commented Dec 4, 2021

@Moerten85
You can also spend your precious time with more constructive experimentation.

You see, in my comment above, I left out the fact that it took me three attempts and as many hours to get it right.

I am rather new to ZFS, however I am willing to go the extra mile, or two or three.

If you still want to use Fedora with ZFS, you have to be willing to learn and experiment, weekly.
And you accumulate mistake after mistake, but you grow and avoid them with experience.

I also saw the update earlier, with zfs-fuse "replacing" zfs.
I opted not to reboot the new kernel, and instead did some research, which paid off.

If you want a more seamless experience, try FreeBSD, Illumos or other Solaris-based OS.
They have great builtin support for all things ZFS.

Good luck.

@Moerten85
Copy link

@catull If you are willing to spend your lifetime with troubles and fixing problems for free. Fine. But not me. And I can not wait until "it is done" eventually in a couple of months to access my data again.

Please see my other bug report:

#12822

I think the time of ZFS has overcome.
Sure it's not only the fault of ZFS.
All this stupid license problems like in a kindergarten.
But the linux integration is very bad now. Will have some tests with Btrfs next time.
For sure ZFS will stay an option for BSD like systems.

@catull
Copy link

catull commented Dec 5, 2021

@Moerten85

  1. I agree with you that hardly anyone chooses a fully altruistic life-style. Be thankful for the ones who are semi-altruistic.
  2. The OpenZFS integration with Fedora 34 and 35 are very usable IMHO. You have to be careful though.
  3. The licensing situation is not going to change.

Your issue #12822 shows that you are moving in the right direction.
Congratulations!

Does it not feel great to have solved it ?!!

@tonyhutter
Copy link
Contributor

I'm back from vacation - quick update:

Normally when a new Fedora version comes out, we can take the current ZFS release and painlessly re-build the dkms RPMs for it. In this particular case though, F35 needs additional patches from master that aren't in the zfs-2.1.1 release to build the RPMs. And when I say build the RPMs, I mean build the RPMs that get distributed, not "do a dkms build to get the zfs modules". Anyway, we're working on a new zfs-2.1.2 release that includes all the necessary patches to build on F35. I think we have most of the last-minute patches that we want in, so hope to have it out soon.

@tonyhutter
Copy link
Contributor

zfs-2.1.2 is out now, with F35 support included:
https://github.com/openzfs/zfs/releases/tag/zfs-2.1.2

Make sure you use the new F35 zfs-release RPM:
https://zfsonlinux.org/fedora/zfs-release.fc35.noarch.rpm

@Moerten85
Copy link

Hi, glad to hear this. As a feedback.
I did an upgrade now as mentioned here:

https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/

But after reboot it seems that the ZFS modules are not available anymore:

$ sudo zpool status
The ZFS modules are not loaded.
Try running '/sbin/modprobe zfs' as root to load them.
$ /sbin/modprobe zfs
modprobe: FATAL: Module zfs not found in directory /lib/modules/5.15.7-200.fc35.x86_64

Did I miss something during upgrade?
Is there an easy way to fix this?
Or is this normal behaviour and I need to compile zfs manually again?

@rabin-io
Copy link

If you did the upgrade in the last 2 days, there was some issue with dnf, that for some reason uninstalled zfs, and install zfs-fuse. you need to check the log on the upgrade to verify that.

also you can easily fix that by reinstalling the package.

@Alexandero89
Copy link

Had the same problem, but dont know if it was because of the problems i had anyway at that time with zfs or because of the upgrade to fedora 35.

solution:
you need to re-install the zfs module into kernel and initramfs. Just reinstalling kernel or zfs using dnf did not work for me.

You need to know your currently used kernel.
For me its "5.15.7-200.fc35.x86_64.img" (check 'uname -a' or take the newest one from 'ls -la /boot' )
And then

sudo dkms install -m zfs -v 2.1.2 -k 5.15.7-200.fc35.x86_64
sudo dracut -f /boot/initramfs-5.15.7-200.fc35.x86_64 5.15.7-200.fc35.x86_64

@PSSGCSim
Copy link

If you did the upgrade in the last 2 days, there was some issue with dnf, that for some reason uninstalled zfs, and install zfs-fuse. you need to check the log on the upgrade to verify that.

also you can easily fix that by reinstalling the package.

It was caused by the new kernel release. One of the zfs packages (zfs-dkms) requires kernel-devel of certain version range and when dnf tries to prune older kernels after upgrade it also removes zfs and swaps it for zfs-fuse which has no such dependency. Reinstalling zfs pulls back the older kernel-devel dependency package and removes the zfs-fuse.

That's at least what I think it was.

@Moerten85
Copy link

Moerten85 commented Dec 16, 2021

@rabin-io
No, I did the Upgrade from Fedora 34 a few minutes ago.

@Alexandero89
Thanks, that fixed it for now. But hopefully compiling zfs is not required every time now.

@PSSGCSim
I was afraid that zfs-fuse would have been installed again after upgrade and tried to remove it. But the package was not installed at all. But there was a second "zfs-dkms" entry on the upgrade package list I can remember. I installed kernel-devel on Fedora 34 and tried to install it again after upgrade. But it was already the newest version.

Also there was this "REMAKE_INITRD" thing on terminal as well as several deprecation warnings. But there already exists issues for these problems I have seen.

@PSSGCSim
Copy link

PSSGCSim commented Dec 16, 2021

@Moerten85

I installed kernel-devel on Fedora 34 and tried to install it again after upgrade. But it was already the newest version.

That is because you usually have multiple versions installed and dnf install will try to install the newest one. Each installed kernel version has one. Example from my system:

$ dnf list installed | grep -i kernel-devel
kernel-devel.x86_64                               5.14.10-300.fc35                       @fedora
kernel-devel.x86_64                               5.15.6-200.fc35                        @updates
kernel-devel.x86_64                               5.15.7-200.fc35                        @updates

So you would have to specify a version with dnf install command.

But simply installing zfs pulled the kernel-devel-5.14.10-300 for me automatically. And that fixed my installation for me the two or three times it happened. But this problem is fixed with the new 2.1.2 release of zfs as 5.15 kernels are supported.

$ dnf repoquery --requires zfs-dkms
...
kernel-devel <= 5.15.999
kernel-devel >= 3.10
...

@showard96
Copy link

Everything upgraded without a hitch today. uname -a Linux Beast 5.15.11-200.fc35.x86_64
[root@Beast showard]# zpool status
pool: data
state: ONLINE
config:

    NAME         STATE     READ WRITE CKSUM
    data         ONLINE       0     0     0
      raidz1-0   ONLINE       0     0     0
        sda      ONLINE       0     0     0
        sdb      ONLINE       0     0     0
        sdc      ONLINE       0     0     0
        sdd      ONLINE       0     0     0
    logs
      nvme0n1    ONLINE       0     0     0
    cache
      nvme1n1p2  ONLINE       0     0     0

errors: No known data errors

So many issues around ZFS and Fedora seem self inflicted and due mostly to not being patient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Packaging custom packages
Projects
None yet
Development

No branches or pull requests