anyone compile and install ZFS manually?

Phil Marsh microcraftx at gmail.com
Thu Dec 7 22:23:06 UTC 2023


Also another question.
The method I proposed to build and install ZFS 2.2.2 in my previous email
apparently leaves out the following: at least I don't see them in the
installed packages in synaptic.
zfs-dkms
zfs-initramfs
zfs-zed
zfsutils-linux
Perhaps those are installed, sidestepping apt package manager, via
sudo make install; sudo 1dconfig; sudo demod
?
The above appears to yield a working ZFS 2.2.2 installation, i.e. scrub and
zfs-list, zpool status all seem to work.
Is there any downside or bad effects to sidestepping the package manager
should I later want to install ZFS 2.1.14 from its package manager when it
becomes available? Assuming I use sudo make uninstall; sudo ldconfig; sudo
depmod
to uninstall my built ZFS 2.2.2?
Of course, I won't update my pools to ZFS 2.2.2 standards.
Also, I could just select ZFS 2.1.14 instead of ZFS 2.2.2 from the OpenZFS
repository and build/install that instead. Might be safer since I'd avoid
the possible hazard of upgrading my pools to ZFS 2.2.2?
What do you think?
If anyone else is interested in this, please let me know as I might be able
to help.
Thanks,
Phil

On Thu, Dec 7, 2023 at 3:13 PM Phil Marsh <microcraftx at gmail.com> wrote:

> Update:
> I found that I could not successfully install ZFS 2.2.2 to Ubuntu 22.04
> via the .deb files generated from the build of ZFS.
>
> https://openzfs.github.io/openzfs-docs/Developer%20Resources/Building%20ZFS.html#
>
> https://openzfs.github.io/openzfs-docs/Developer%20Resources/Custom%20Packages.html
> I doubt that dkms-zfs 2.2.2 was properly installed as well.
> However, from
> https://openzfs.github.io/openzfs-docs/Developer%20Resources/Building%20ZFS.html
> *********************
> Install
> <https://openzfs.github.io/openzfs-docs/Developer%20Resources/Building%20ZFS.html#install>
>
> You can run zfs-tests.sh without installing ZFS, see below. If you have
> reason to install ZFS after building it, pay attention to how your
> distribution handles kernel modules. On Ubuntu, for example, the modules
> from this repository install in the extra kernel module path, which is
> not in the standard depmod search path. Therefore, for the duration of
> your testing, edit /etc/depmod.d/ubuntu.conf and add extra to the
> beginning of the search path.
>
> You may then install using sudo make install; sudo ldconfig; sudo depmod.
> You’d uninstall with sudo make uninstall; sudo ldconfig; sudo depmod.
>
> ***********************
> did yield a working ZFS version 2.2.2 and reported the proper version of
> kmod as well.
> So I'm guessing that while this will "work" it's not a proper package
> install and dkms-zfs won't be able to update/rebuild ZFS 2.2.2 on kernel
> updates.
> Instead, I'm guessing that with such an installation after a kernel update
> I would have to:
> uninstall with:
> sudo make uninstall; sudo ldconfig; sudo depmod
> and reinstall with:
> sudo make install; sudo ldconfig; sudo depmod
> *****************
> It also appears that Ubuntu maintainers recognize the problems with ZFS
> 2.1.5 and are planning to make ZFS 2.1.14 available soon.
> Best,
> Phil
>
>
> On Thu, Dec 7, 2023 at 10:18 AM Phil Marsh <microcraftx at gmail.com> wrote:
>
>> Hi Sean, Bob, Sy, All,
>>
>> From:
>>
>> https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/2044657
>>
>> It appears that the Ubuntu team are aware of this and working on this and
>> for Ubuntu 22.04 (Jammy) they plan to update from ZFS 2.1.5 to ZFS 2.1.14.
>> Hoping they can do it soon.
>>
>> By the way, I was able to get ZFS 2.2.2 running on one of my Ubuntu
>> machines (semi-production, not my critical server) with dkms-zfs2.2.2, but
>> I could not get other ZFS-related software utilities like zsys installed
>> for this version. I'm thinking all I really need is ZFS2.2.2 itself and
>> dkms-zfs2.2.2? I got to the above point using OpenZFS build instructions
>> https://openzfs.github.io/openzfs-docs/Developer%20Resources/Building%20ZFS.html
>>
>> and
>> https://openzfs.github.io/openzfs-docs/Developer%20Resources/Custom%20Packages.html
>>
>> I had noticed that I had to use the RPM-converted deb-based DKMS and user
>> packages procedure as the native version had some dependency issues.
>>
>> What if I don't get say zsys or some other packages with ZFS? I'm hoping
>> the snapshots will still work but need to try that out.
>>
>> After building, you will see .deb packages which I think, you can use to
>> install ZFS and other associated programs. It seems that the order of
>> installation was important and perhaps you should install the DKMS package
>> first then ZFS, then try the others. But I also was not able to install all
>> the available debs due to dependency errors. However, the resulting ZFS
>> 2.2.2 installation did seem to work.
>>
>> Moreover, and you likely know this already, you might want to hold off
>> upgrading your ZFS pools themselves after upgrading to ZFS 2.2.2 in case
>> you need to fall back to the original ZFS.
>>
>> I can elaborate after I use trial and error to get a stable method but
>> you can try this yourself on a chroot machine, virtual machine, or
>> non-production box.
>>
>> Best of luck and thanks
>>
>> Phil
>>
>> On Mon, Dec 4, 2023 at 2:44 PM Sean Reifschneider <jafo00 at gmail.com>
>> wrote:
>>
>>> When I want to update software on an Ubuntu system, the first place I
>>> look is to go to packages.ubuntu.com and grab a version from there
>>> (usually I'll grab the one from the most recent release, in this case
>>> 23.11, then if that one has issues building I'll grab the one matching my
>>> release, in this case 22.04), grab the "debian.tar.xz" and try extracting
>>> that in the latest source, and try using that deb to build it.  In this
>>> case since there's a kernel component, you probably want to start with the
>>> version matching your release, 22.04.
>>> http://archive.ubuntu.com/ubuntu/pool/main/z/zfs-linux/zfs-linux_2.1.5-1ubuntu6~22.04.2.debian.tar.xz
>>>
>>> Then grab the latest zfs:
>>> https://github.com/openzfs/zfs/releases/download/zfs-2.2.2/zfs-2.2.2.tar.gz
>>>
>>> Extract ZFS, then go into that directory and extract the debian.tar.xz
>>>
>>> Then run "debuild" and see what breaks.
>>>
>>> Because this is ZFS we're talking about, it is heavily patched, and so
>>> it's not looking like it'll cleanly build.  But, you now have a set of
>>> patches you can check to see what needed to happen to the 2.1.5 code to
>>> integrate into Ubuntu, and what sort of things you might want to do to the
>>> 2.2.2 code...
>>>
>>> On Sun, Dec 3, 2023 at 2:54 PM Bob Proulx <bob at proulx.com> wrote:
>>>
>>>> > Basically, my question amounts to:
>>>> > How do I install ZFS via manual compilation to get the latest version
>>>> so
>>>> > that I can use zfs-dkms or equivalent to automatically compile and
>>>> install
>>>> > kernel modules when the kernel is updated?
>>>>
>>>> First, I have no idea!  I haven't done it.  But to compile it from
>>>> source I would think the Gentoo instructions might help.  Then combine
>>>> that with the DKMS instructions.
>>>>
>>>>     https://wiki.gentoo.org/wiki/ZFS
>>>>     https://help.ubuntu.com/community/DKMS
>>>>
>>>> That information will probably need to be combined with compiling your
>>>> own custom Ubuntu kernel.  In the long distant past I had troubles
>>>> matching expected versions between modules and prebuilt kernels and
>>>> found it easier to compile both.
>>>>
>>>>     https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
>>>>
>>>> Again I haven't done it.  I don't know what problems will appear.  But
>>>> not seeing anyone else jump in with something I thought I would
>>>> contribute the above.  Little help though it might be.
>>>>
>>>> Bob
>>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.nclug.org/pipermail/nclug/attachments/20231207/0c78ca8e/attachment-0001.htm>


More information about the NCLUG mailing list