Welcome! Log In Create A New Profile

Advanced

Debian on Zyxel NAS326

Posted by Kirsch 
Re: Debian on Zyxel NAS326
December 18, 2021 10:05PM
thistleknot,

> the problem I get is
>
> Module zfs not found in directory
> /lib/modules/5.15.15...

I need to see the log of what you did. Which packages did you install? and did you install the kernel headers linux-headers-5.15.5-mvebu-tld-1_1.0_armhf.deb?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Zyxel NAS326
December 19, 2021 08:05AM
apparently i had the wrong headers (I searched for what I thought were them here: http://armbian.tnahosting.net/apt/pool/main/l/linux-5.15.5-mvebu/)

ls /root/linux-headers-edge-mvebu_21.11.0-trunk.70_armhf.deb

derp... I had the headers the whole time...

/boot/linux-headers-5.15.5-mvebu-tld-1_1.0_armhf.deb

trying to install zfsutils-linux:armhf

apt install zfsutils-linux:armhf
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  fuse libfuse2
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libnvpair3linux libuutil3linux libzfs4linux libzpool5linux
Suggested packages:
  zfs-initramfs | zfs-dracut
Recommended packages:
  zfs-zed
The following NEW packages will be installed:
  libnvpair3linux libuutil3linux libzfs4linux libzpool5linux zfsutils-linux
0 upgraded, 5 newly installed, 0 to remove and 303 not upgraded.
Need to get 0 B/2075 kB of archives.
After this operation, 5197 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package libnvpair3linux.
(Reading database ... 69762 files and directories currently installed.)
Preparing to unpack .../libnvpair3linux_2.1.2-1_armhf.deb ...
Unpacking libnvpair3linux (2.1.2-1) ...
Selecting previously unselected package libuutil3linux.
Preparing to unpack .../libuutil3linux_2.1.2-1_armhf.deb ...
Unpacking libuutil3linux (2.1.2-1) ...
Selecting previously unselected package libzfs4linux.
Preparing to unpack .../libzfs4linux_2.1.2-1_armhf.deb ...
Unpacking libzfs4linux (2.1.2-1) ...
Selecting previously unselected package libzpool5linux.
Preparing to unpack .../libzpool5linux_2.1.2-1_armhf.deb ...
Unpacking libzpool5linux (2.1.2-1) ...
Selecting previously unselected package zfsutils-linux.
Preparing to unpack .../zfsutils-linux_2.1.2-1_armhf.deb ...
Unpacking zfsutils-linux (2.1.2-1) ...
Setting up libnvpair3linux (2.1.2-1) ...
Setting up libuutil3linux (2.1.2-1) ...
Setting up libzfs4linux (2.1.2-1) ...
Setting up libzpool5linux (2.1.2-1) ...
Setting up zfsutils-linux (2.1.2-1) ...
modprobe: FATAL: Module zfs not found in directory /lib/modules/5.15.5-mvebu-tld-1
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.33-1) ...

trying to install zfs-dkms
"since ZFS is not designed for 32-bit kernels."

root@debian:~# apt reinstall zfs-dkms:armhf -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  fuse libfuse2
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 303 not upgraded.
Need to get 2289 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://deb.debian.org/debian unstable/contrib armhf zfs-dkms all 2.1.2-1 [2289 kB]
Fetched 2289 kB in 0s (7771 kB/s)
Preconfiguring packages ...
(Reading database ... 70073 files and directories currently installed.)
Preparing to unpack .../zfs-dkms_2.1.2-1_all.deb ...
Unpacking zfs-dkms (2.1.2-1) over (2.1.2-1) ...
Setting up zfs-dkms (2.1.2-1) ...
Ok, aborting, since ZFS is not designed for 32-bit kernels.
Processing triggers for initramfs-tools (0.140) ...
update-initramfs: Generating /boot/initrd.img-5.15.5-mvebu


I did find a guide (but trying to build them would stop me on the /lib/modules error mentioned earlier)

https://www.familybrown.org/dokuwiki/doku.php?id=advanced:target

I'm going to try to rebuild once more with the correct headers installed.

Edit:

When I try to build it (I thought I got past this point earlier, up until the point of actually trying to modprobe zfs)

make clean all; ./autogen.sh; ./configure; make; sudo make install;

fails on the ./configure (doesn't like those headers)

checking kernel source directory... /usr/src/linux-headers-5.15.5-mvebu-tld-1
checking kernel build directory... /usr/src/linux-headers-5.15.5-mvebu-tld-1
checking kernel source version... 5.15.5-mvebu-tld-1
checking kernel file name for module symbols... Module.symvers
checking whether modules can be built... no
configure: error:
        *** Unable to build an empty module.

this says I'm missing something in the headers

"Your kernel source code is either missing important components, or was built with modules disabled. SPL can't be built like this without them."

cat config.log

zfsexecdir='${exec_prefix}/libexec/zfs'

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "zfs"
#define PACKAGE_TARNAME "zfs"
#define PACKAGE_VERSION "2.1.99"
#define PACKAGE_STRING "zfs 2.1.99"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define ZFS_META_NAME "zfs"
#define ZFS_META_VERSION "2.1.99"
#define SPL_META_VERSION ZFS_META_VERSION
#define ZFS_META_RELEASE "599_g3fa5266d7"
#define SPL_META_RELEASE ZFS_META_RELEASE
#define ZFS_META_LICENSE "CDDL"
#define ZFS_META_ALIAS "zfs-2.1.99-599_g3fa5266d7"
#define SPL_META_ALIAS ZFS_META_ALIAS
#define ZFS_META_AUTHOR "OpenZFS"
#define ZFS_META_KVER_MIN "3.10"
#define ZFS_META_KVER_MAX "5.15"
#define PACKAGE "zfs"
#define VERSION "2.1.99"
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_DLFCN_H 1
#define LT_OBJDIR ".libs/"
#define HAVE_IMPLICIT_FALLTHROUGH 1
#define SYSTEM_LINUX 1
#define HAVE_PYTHON "3.9"
#define ENABLE_NLS 1
#define HAVE_GETTEXT 1
#define HAVE_DCGETTEXT 1
#define HAVE_ZLIB 1
#define HAVE_LIBUUID 1
#define HAVE_LIBBLKID 1
#define HAVE_LIBTIRPC 1
#define HAVE_LIBUDEV 1
#define HAVE_UDEV_DEVICE_GET_IS_INITIALIZED 1
#define HAVE_LIBCRYPTO 1
#define HAVE_LIBAIO 1
#define LIBFETCH_IS_FETCH 0
#define LIBFETCH_IS_LIBCURL 1
#define LIBFETCH_DYNAMIC 1
#define LIBFETCH_SONAME "libcurl.so.4"
#define HAVE_MAKEDEV_IN_SYSMACROS 1
#define HAVE_MLOCKALL 1

configure: exit 1



Edited 8 time(s). Last edit at 12/19/2021 08:48AM by thistleknot.
Re: Debian on Zyxel NAS326
December 19, 2021 03:53PM
thistleknot,

Now I recall ZFS symbols were removed from the kernel a while back. It's the GPL issue.

So out there must be some instruction what to do for ZFS to work again, i.e seeing the symbols. There was report later that it was back working. So it seems a step is missing in your process.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Zyxel NAS326
December 19, 2021 04:06PM
I'm not sure what to do about symbols

according to github's openzfs it works with up to kernel 5.15

I did see I didn't upload the entire config.log, but it's long so I parsed it down to just relevant errors

root@debian:~/zfs# cat config.log | grep error
Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
gcc: error: unrecognized command-line option '-V'
gcc: fatal error: no input files
gcc: error: unrecognized command-line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
conftest.c:22:10: fatal error: ac_nonexistent.h: No such file or directory
conftest.c:22:10: fatal error: ac_nonexistent.h: No such file or directory
Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
gcc: error: unrecognized command-line option '-V'
gcc: fatal error: no input files
gcc: error: unrecognized command-line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
conftest.c:37:20: error: unknown type name 'error'
   37 |                    error fail
conftest.c:37:20: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
|                    error fail
configure:15581: gcc -c -g -O2 -Werror -Wunused-but-set-variable  conftest.c >&5
configure:15617: gcc -c -g -O2 -Werror -Wbool-compare  conftest.c >&5
configure:15653: gcc -c -g -O2 -Werror -Wimplicit-fallthrough  conftest.c >&5
configure:15692: gcc -c -g -O2 -Werror -Wframe-larger-than=4096  conftest.c >&5
configure:15728: gcc -c -g -O2 -Werror -Wno-format-truncation  conftest.c >&5
configure:15764: gcc -c -g -O2 -Werror -Wno-format-zero-length  conftest.c >&5
configure:15800: gcc -c -g -O2 -Werror -fno-omit-frame-pointer  conftest.c >&5
configure:15836: gcc -c -g -O2 -Werror -fno-ipa-sra  conftest.c >&5
conftest.c:37:10: fatal error: CoreFoundation/CFPreferences.h: No such file or directory
conftest.c:37:10: fatal error: CoreFoundation/CFLocale.h: No such file or directory
conftest.c:37:10: fatal error: CoreFoundation/CFLocale.h: No such file or directory
collect2: error: ld returned 1 exit status
| /* Override any GCC internal prototype to avoid an error.
conftest.c:77:10: fatal error: rpc/xdr.h: No such file or directory
conftest.c:51:12: fatal error: fetch.h: No such file or directory
conftest.c:85:10: fatal error: security/pam_modules.h: No such file or directory
conftest.c:52:10: fatal error: security/pam_modules.h: No such file or directory
conftest.c:54:12: fatal error: sys/mkdev.h: No such file or directory
collect2: error: ld returned 1 exit status
| /* Override any GCC internal prototype to avoid an error.
collect2: error: ld returned 1 exit status
| /* Override any GCC internal prototype to avoid an error.
collect2: error: ld returned 1 exit status
| /* Override any GCC internal prototype to avoid an error.
configure:64354: error:
# Use recursive makes in order to ignore errors during check

I wrote a new issue on openzfs

https://github.com/openzfs/zfs/issues/12883



Edited 1 time(s). Last edit at 12/19/2021 04:28PM by thistleknot.
Re: Debian on Zyxel NAS326
December 22, 2021 09:45AM
I've since compiled openzfs on oracle linux 8.3 and am using that. It makes more sense to do that as I want to deduplicate my data and to get the benefit from that without it sending deduplicated data over the network, it should be done on the vhost.

However... having said that. If anyone else is interested, there is lvmVDO (I couldn't get it to work with my UEK kernel, so I expect others may have similar issues with custom debian kernel's) which is an lvm version of RedHat's VDO

https://manpages.debian.org/testing/lvm2/lvmvdo.7.en.html

here's some build instructions for debian

I've also noticed that my NAS caps out at around 55MB/s (as opposed to 125MB/s theoretical limit of 1Gb/s).

I did a netcat test



Edited 1 time(s). Last edit at 12/22/2021 09:54AM by thistleknot.
Author:

Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: