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

Bundle for ZFS drivers #631

Closed
darkdragon-001 opened this issue Apr 18, 2019 · 19 comments
Closed

Bundle for ZFS drivers #631

darkdragon-001 opened this issue Apr 18, 2019 · 19 comments

Comments

@darkdragon-001
Copy link

Please add a bundle to mount and manage ZFS volumes in Clear Linux.

@ahkok
Copy link
Contributor

ahkok commented Apr 19, 2019

Unlikely this will happen. Please consider using btrfs which is supported out of the box, or compile the drivers yourself.

@darkdragon-001
Copy link
Author

Usually, I usually prefer btrfs over zfs, but this time I want to add an SSD cache to my HDD raid for speed reasons. Sadly, btrfs has no easy support for this...

@ahkok
Copy link
Contributor

ahkok commented Apr 22, 2019

This seems unreasonable to keep open unless licensing concerns are addressed by the copyright owner of this code.

@ahkok ahkok closed this as completed Apr 22, 2019
@redbal
Copy link

redbal commented Jun 1, 2019

I was able to successfully compile ZFS on linux and have the resulting working binaries, but can't get the kernel module to load: modprobe: ERROR: could not insert 'zfs': Required key not available. I'm not sure what this means, but would like to get it sorted out if anyone has some ideas.

@bryteise
Copy link
Member

bryteise commented Jun 1, 2019

@redbal This might be better talked about on the forums but I think you need to pass a special kernel commandline flag and use an lts kernel (though I didn't check which of the kernels had this patch so you might see more of them).

@bryteise
Copy link
Member

bryteise commented Jun 1, 2019

@puneetse Do we have documentation that talks about using unsigned kernel modules?

@fenrus75
Copy link
Contributor

fenrus75 commented Jun 1, 2019 via email

@puneetse
Copy link
Contributor

puneetse commented Jun 2, 2019

@redbal
Copy link

redbal commented Jun 2, 2019

@puneetse @bryteise Wow! we must be on the same wavelength...I just completed the steps in https://clearlinux.org/documentation/clear-linux/guides/maintenance/kernel-modules and was able to recompile and load the zfs modules. Now, zfs and zpool works perfectly on clearlinux. Thanks

@jimsalterjrs
Copy link

https://clearlinux.org/documentation/clear-linux/guides/maintenance/kernel-modules 404s now.

Has this document moved? I wasn't able to find it searching the site for "kernel modules".

@jimsalterjrs
Copy link

@redbal how did you resolve the uuid.h missing problem? Or did you encounter that? I found a web.archive.org snapshot of the removed kernel-modules document and got through that, but when attempting to ./configure the ZFS module, I end up with:

configure: error: in `/home/jim/zfs-0.8.3':
configure: error:
           *** uuid/uuid.h missing, libuuid-devel package required
See `config.log' for more details.

Haven't been able to figure out where the configure script is looking for uuid.h (which is present on the system itself), so I'm stuck.

@redbal
Copy link

redbal commented Feb 14, 2020 via email

@miguelinux
Copy link

miguelinux commented Feb 14, 2020 via email

@jimsalterjrs
Copy link

For anybody else going through this—the relevant bundles you need are linux-lts-dev if you're on the LTS kernel (which you'll probably need to be) or linux-dev for the native kernel, and then os-core-dev to resolve the uuid.h issue.

@jimsalterjrs
Copy link

root@clearlinux/home/jim # insmod /usr/lib/modules/4.19.103-113.lts2018/extra/zfs/zfs.ko
insmod: ERROR: could not insert module /usr/lib/modules/4.19.103-113.lts2018/extra/zfs/zfs.ko: Unknown symbol in module

I don't suppose anybody has any idea who I find out which symbol is the unknown symbol? I appreciate the help so far.

@jimsalterjrs
Copy link

jimsalterjrs commented Feb 16, 2020

^^ the answer to the above—or at least, the one I went with—is not to use insmod at all, which does not resolve dependencies, and instead use modprobe.

Trick there is, modprobe won't find the modules where the make install command left them, each in its own subdirectory under /lib/modules/<kernelversion>/extra.

I went a bit brute-force, and did:

root@clear:~# for mod in `find /lib/modules/<kernelversion>/extra -iname *.ko
do ln -s $mod /lib/modules/<kernelversion>/ 
done

After which I could just modprobe zfs.ko, and everything worked fine: although also note, the zpool and zfs commands are placed in /usr/local/sbin, and that directory is not in the default PATH.

Finally, you'll probably want ZFS to auto-load on boot:

root@clear:~# mkdir -p /etc/modules-load.d
root@clear:~# echo 'zfs' > /etc/modules-load.d/zfs.conf

After that, zfs.ko will be automatically and successfully loaded at each reboot. (But keep in mind, you're going to need to rebuild the ZFS module every time you get a new kernel version from swupd.)

@bwarden
Copy link
Member

bwarden commented Feb 18, 2020

Trick there is, modprobe won't find the modules where the make install command left them, each in its own subdirectory under /lib/modules/<kernelversion>/extra.

depmod -a

@darkdragon-001
Copy link
Author

darkdragon-001 commented Jul 13, 2020

I just found a tutorial in the docs using DKMS (for non-root devices).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants