• How to install ZFS?


    Hi all,

    I’ ve installed Antergos on a VM in VirtualBox by using the default partition scheme without ZFS (first attempt to install ZFS on root failed). Now I want to install the ZFS modules and have tried with some packages in the AUR without success. Can someone enlighten me how can I make ZFS work on Antergos?

    BTW, my host system is based on Ubuntu 16.04 so I’m not familiar with Antergos and Arch…

    Thanks!

  • pacman -S zfs
    

    (I think the reason you can use pacman is that antergos has it in its repository, usually on arch you have to use the AUR (AKA yaourt)

    I have been using it daily for about a year on my spinning drives without issues. Execpt a couple of weeks ago when an update went wrong, but there was a solution on the arch wiki after an hour os so. It usually is.

    See:

    https://wiki.archlinux.org/index.php/ZFS

    I make things work…
    My humble wiki: https://anotherlinux.com/

  • Thanks for the quick response!

    I have just tried and I get an error…

    [[email protected] ~]$ sudo pacman -S zfs

    [sudo] password for anergos: 
    resolving dependencies...
    looking for conflicting packages...
    :: spl and spl-dkms-git are in conflict (spl-dkms). Remove spl-dkms-git? [y/N] y
    :: spl-utils and spl-utils-dkms-git are in conflict. Remove spl-utils-dkms-git? [y/N] y
    
    Packages (6) spl-0.7.0.r1038.4.12.3_1-1  spl-dkms-git-0.7.0_r12_g9df9692-1 [removal]  spl-utils-0.7.0.r1038.4.12.3_1-1
                 spl-utils-dkms-git-0.7.0_r12_g9df9692-1 [removal]  zfs-utils-0.7.0.r2997.4.12.3_1-1  zfs-0.7.0.r2997.4.12.3_1-1
    
    Total Download Size:   10.32 MiB
    Total Installed Size:  62.37 MiB
    Net Upgrade Size:      59.62 MiB
    
    :: Proceed with installation? [Y/n] y
    :: Retrieving packages...
     spl-utils-0.7.0.r1038.4.12.3_1-1-x86_64                                     18.1 KiB   785K/s 00:00 [############################################################] 100%
     spl-0.7.0.r1038.4.12.3_1-1-x86_64                                          432.5 KiB  4.10M/s 00:00 [############################################################] 100%
     zfs-utils-0.7.0.r2997.4.12.3_1-1-x86_64                                      3.7 MiB  6.36M/s 00:01 [############################################################] 100%
     zfs-0.7.0.r2997.4.12.3_1-1-x86_64                                            6.2 MiB  4.72M/s 00:01 [############################################################] 100%
    (4/4) checking keys in keyring                                                                       [############################################################] 100%
    (4/4) checking package integrity                                                                     [############################################################] 100%
    (4/4) loading package files                                                                          [############################################################] 100%
    (4/4) checking for file conflicts                                                                    [############################################################] 100%
    (6/6) checking available disk space                                                                  [############################################################] 100%
    :: Running pre-transaction hooks...
    (1/1) Remove DKMS modules
    ==> dkms remove spl/0.7.0 -k 4.9.44-1-lts
    ==> dkms remove spl/0.7.0 -k 4.12.8-1-ARCH
    :: Processing package changes...
    (1/2) removing spl-dkms-git                                                                          [############################################################] 100%
    (2/2) removing spl-utils-dkms-git                                                                    [############################################################] 100%
    (1/4) installing spl-utils                                                                           [############################################################] 100%
    (2/4) installing spl                                                                                 [############################################################] 100%
    (3/4) installing zfs-utils                                                                           [############################################################] 100%
    warning: directory permissions differ on /etc/sudoers.d/
    filesystem: 750  package: 755
    (4/4) installing zfs                                                                                 [############################################################] 100%
    Created symlink /etc/systemd/system/zfs-mount.service.wants/zfs-import-cache.service → /usr/lib/systemd/system/zfs-import-cache.service.
    Created symlink /etc/systemd/system/zfs.target.wants/zfs-import-cache.service → /usr/lib/systemd/system/zfs-import-cache.service.
    Created symlink /etc/systemd/system/zfs-share.service.wants/zfs-mount.service → /usr/lib/systemd/system/zfs-mount.service.                                              
    Created symlink /etc/systemd/system/zfs.target.wants/zfs-mount.service → /usr/lib/systemd/system/zfs-mount.service.                                                     
    Created symlink /etc/systemd/system/zfs.target.wants/zfs-share.service → /usr/lib/systemd/system/zfs-share.service.                                                     
    Created symlink /etc/systemd/system/zed.service → /usr/lib/systemd/system/zfs-zed.service.                                                                              
    Created symlink /etc/systemd/system/zfs.target.wants/zfs-zed.service → /usr/lib/systemd/system/zfs-zed.service.                                                         
    Created symlink /etc/systemd/system/multi-user.target.wants/zfs.target → /usr/lib/systemd/system/zfs.target.                                                            
    :: Running post-transaction hooks...                                                                                                                                    
    (1/4) Install DKMS modules                                                                                                                                              
    ==> dkms install zfs/0.7.0 -k 4.9.44-1-lts                                                                                                                              
    configure: error:                                                                                                                                                       
            *** Please make sure the kmod spl devel <kernel> package for your                                                                                               
            *** distribution is installed then try again.  If that fails you                                                                                                
            *** can specify the location of the spl objects with the                                                                                                        
            *** '--with-spl-obj=PATH' option.  Failed to find spl_config.h in                                                                                               
            *** any of the following:                                                                                                                                       
            /usr/src/spl-0.7.0/4.9.44-1-lts                                                                                                                                 
            /usr/src/spl-0.7.0                                                                                                                                              
    **Error!  Build of zavl.ko failed for: 4.9.44-1-lts (x86_64)**                                                                                                              
    Consult the make.log in the build directory                                                                                                                             
    /var/lib/dkms/zfs/0.7.0/build/ for more information.                                                                                                                    
    ==> dkms install spl/0.7.0 -k 4.9.44-1-lts                                                                                                                              
    ==> dkms install zfs/0.7.0 -k 4.12.8-1-ARCH                                                                                                                             
    configure: error:                                                                                                                                                       
            *** Please make sure the kmod spl devel <kernel> package for your                                                                                               
            *** distribution is installed then try again.  If that fails you                                                                                                
            *** can specify the location of the spl objects with the                                                                                                        
            *** '--with-spl-obj=PATH' option.  Failed to find spl_config.h in                                                                                               
            *** any of the following:                                                                                                                                       
            /usr/src/spl-0.7.0/4.12.8-1-ARCH                                                                                                                                
            /usr/src/spl-0.7.0                                                                                                                                              
    **Error!  Build of zavl.ko failed for: 4.12.8-1-ARCH (x86_64)**                                                                                                             
    Consult the make.log in the build directory                                                                                                                             
    /var/lib/dkms/zfs/0.7.0/build/ for more information.                                                                                                                    
    ==> dkms install spl/0.7.0 -k 4.12.8-1-ARCH
    

    I don’t see anything wrong in the make.log…

    Any ideas?

  • sudo pacman -S lnux-headers

    Install the headers.

    @karasu You should have a look at this ;).

    I make things work…
    My humble wiki: https://anotherlinux.com/

  • Just tried but I got an error:

    [[email protected] ~]$ sudo pacman -S linux-headers
    warning: linux-headers-4.12.8-1 is up to date -- reinstalling
    resolving dependencies...
    looking for conflicting packages...
    
    Packages (1) linux-headers-4.12.8-1
    
    Total Installed Size:  38.46 MiB
    Net Upgrade Size:       0.00 MiB
    
    :: Proceed with installation? [Y/n] y
    (1/1) checking keys in keyring                                                                       [############################################################] 100%
    (1/1) checking package integrity                                                                     [############################################################] 100%
    (1/1) loading package files                                                                          [############################################################] 100%
    (1/1) checking for file conflicts                                                                    [############################################################] 100%
    (1/1) checking available disk space                                                                  [############################################################] 100%
    :: Running pre-transaction hooks...
    (1/1) Remove DKMS modules
    ==> dkms remove zfs/0.7.0 -k 4.12.8-1-ARCH
    **Error! There is no instance of zfs 0.7.0**
    for kernel 4.12.8-1-ARCH (x86_64) located in the DKMS tree.
    ==> dkms remove spl/0.7.0 -k 4.12.8-1-ARCH
    ==> dkms remove vboxguest/5.1.26_OSE -k 4.12.8-1-ARCH
    :: Processing package changes...
    (1/1) reinstalling linux-headers                                                                     [############################################################] 100%
    :: Running post-transaction hooks...
    (1/2) Install DKMS modules
    ==> dkms install zfs/0.7.0 -k 4.12.8-1-ARCH
    configure: error: 
            *** Please make sure the kmod spl devel <kernel> package for your
            *** distribution is installed then try again.  If that fails you
            *** can specify the location of the spl objects with the
            *** '--with-spl-obj=PATH' option.  Failed to find spl_config.h in
            *** any of the following:
            /usr/src/spl-0.7.0/4.12.8-1-ARCH
            /usr/src/spl-0.7.0                                                                                                                                              
    **Error!  Build of zavl.ko failed for: 4.12.8-1-ARCH (x86_64)**                                                                                                             
    Consult the make.log in the build directory                                                                                                                             
    /var/lib/dkms/zfs/0.7.0/build/ for more information.                                                                                                                    
    ==> dkms install spl/0.7.0 -k 4.12.8-1-ARCH                                                                                                                             
    ==> dkms install vboxguest/5.1.26_OSE -k 4.12.8-1-ARCH                                                                                                                  
    (2/2) Arming ConditionNeedsUpdate...                                                                                                                                    
    

    Then I removed all zfs and spl packages and tried again by installing all related packages with version 0.7.1.4.12…
    Now It seems to be working!
    The question is what will happen when I get a kernel update…

  • As good rule you should update before installing kernel modules.

    Use the update app or sudo pacman - Syu

    To answer your question :
    Dkms will rebuild the module automatically when you upgrade, you never have to think about it again.

    I make things work…
    My humble wiki: https://anotherlinux.com/

  • I thought dkms will not care of zfs but I didn’t check it.
    Just did “dkms status” and zfs is in the output!
    Great!

    Thanks!

  • @karasu : There is something wrong here. I updated today and had to “reinstall” zfs…

    sudo pacman -S zfs
    

    I make things work…
    My humble wiki: https://anotherlinux.com/

zfs34 Posts 8Views 446
Log in to reply