zfs not included in manjaro-architect (Manjaro 20.0 Lysia)

According to this announcement

Manjaro Architect should provide all what is need to install on zfs.

Manjaro Architect supports now ZFS installation by providing the needed kernel modules.

But this is not correct. Neither the zfs modules nor the zfs utils, like zpool, are available in the ISO.

Will there be an updated ISO soon? And is there a tutorial somewhere how to do it?

zfs can be manually installed with `pacman -S linux56-zfs. But the intsllation on zfs fails with:

downloading lib32-libcanberra-gstreamer-0.30+2+gc0620e4-1-x86_64.pkg.tar.xz...
downloading lib32-libcanberra-pulse-0.30+2+gc0620e4-1-x86_64.pkg.tar.xz...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
error: Partition /mnt too full: 192550 blocks needed, 173120 blocks free
error: not enough free disk space
error: failed to commit transaction (not enough free disk space)
Errors occurred, no packages were upgraded.
==> ERROR: Failed to install packages to new root

But the zfs mount points seem to be correct:

[manjaro ~]# df
Dateisystem                     Größe Benutzt Verf. Verw% Eingehängt auf
dev                              7,8G       0  7,8G    0% /dev
run                              7,9G    108M  7,8G    2% /run
/dev/sr0                         2,7G    2,7G     0  100% /run/miso/bootmnt
cowspace                         256M       0  256M    0% /run/miso/cowspace
overlay_root                      12G     91M   12G    1% /run/miso/overlay_root
/dev/loop0                        73M     73M     0  100% /run/miso/sfs/livefs
/dev/loop1                       579M    579M     0  100% /run/miso/sfs/mhwdfs
/dev/loop2                       1,4G    1,4G     0  100% /run/miso/sfs/desktopfs
/dev/loop3                       584M    584M     0  100% /run/miso/sfs/rootfs
overlay                           12G     91M   12G    1% /
tmpfs                            7,9G       0  7,9G    0% /dev/shm
tmpfs                            7,9G       0  7,9G    0% /sys/fs/cgroup
tmpfs                            7,9G     47M  7,8G    1% /tmp
tmpfs                            7,9G    2,2M  7,9G    1% /etc/pacman.d/gnupg
tmpfs                            1,6G     16K  1,6G    1% /run/user/1000
zpmanjaro/ROOT/manjaro/root       22G    8,7M   22G    1% /mnt
zpmanjaro/data/home               22G    128K   22G    1% /mnt/home
zpmanjaro/ROOT/manjaro/paccache   23G    1,2G   22G    6% /mnt/var/cache/pacman
/dev/sda1                        511M    4,0K  511M    1% /mnt/boot/efi

Just tried the architect ISO myself and can confirm that the installer tells me that the modules are not included.

(Aside from the wild mirrorlist)

EDIT: If you dare to go that deep, why not try Arch itself?

I have never been able to get an install on 20G to work. If you give it more space, it will work. It doesn't use the space, it is something odd with how it is checking that impacts zfs.

I keep meaning to look into it but never make it a priority.

Manjaro has better zfs support than Arch does. Maintaining a zfs root on Arch is a bit trickier.

1 Like

Yes! Just realized that. With a 40 GB drive it is moving further.
But after reboot there is an error: Sparse file not allowed. And I am dropped into an emergency shell.
Looks like the pool is not mountend. Do I need any special treatment for grub resp. fstab?

This message is annoying but quite cosmetic.

It appears because Manjaro default to GRUB_SAVEDEFAULT=true in /etc/default/grub and the filesystem on /boot is not supported in grub.

I have seen the message with f2fs and other - for grub - unsupported filesystems.

If it is worth the trouble you can work around it by using a separate partition mounted on /boot using a supported filesystem

Gah, grub support got broken again.....

You need to set GRUB_SAVEDEFAULT=false in /etc/default/grub

I am pretty concerned that if that didn't happen by default in your install, it is possible that none of the zfs stuff did though.

What does your GRUB_CMDLINE_LINUX_DEFAULT look like?

Architect ISO is not yet released. Zfs kernel module is available on mhwd repository in /opt. We have to check with @Chrysostomus if something is still missing on released ISOs.

GRUB_CMDLINE_LINUX_DEFAULT="quiet udev.log_priority=3"

Did that. but updating grub fails:

/usr/bin/grub-probe: error: failed to get canonical path of `/dev/2d790ed8-02'.

fstab looks like this:

sh-5.0# cat /etc/fstab 
# zpmanjaro/ROOT/manjaro/root
#zpmanjaro/ROOT/manjaro/root	/         	zfs       	rw,xattr,noacl	0 0

# zpmanjaro/data/home
#zpmanjaro/data/home 	/home     	zfs       	rw,xattr,noacl	0 0

# zpmanjaro/ROOT/manjaro/paccache
#zpmanjaro/ROOT/manjaro/paccache	/var/cache/pacman	zfs       	rw,xattr,noacl	0 0

# /dev/sda1
UUID=3E59-27F8      	/boot/efi 	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro	0 0

Yeah...it looks like the grub section of manjaro-architect for zfs grub installation isn't being executed anymore.

Your grub doesn't even contain the needed kernel options for zfs.

You can fix it by adding

zfs=zpmanjaro/ROOT/manjaro/root rw


You can fix this with export ZPOOL_VDEV_NAME_PATH=YES before running update-grub. The installer would normally add it to your /etc/environment.

I will try to take a look at this today and see if I can get the grub support fixed in m-a. As a side note, it should work fine with systemd-boot and efi mounted as /boot.

That did the trick. It is booting! Thanks!

Now that the system is up and running I have more questions:

  • The zpool shows ashift=0. This is odd. Should be 12 for almost all hard drives including SSDs.
  • zfs recordsize is 128k. I prefer 1M for performance reasons. Any chance to set this in m-a?
  • zfs compression is off. Why?

In fact, I prefer the following settings for any zfs filesystem:

zfs set recordsize=1M $POOL
zfs set atime=on $POOL
zfs set relatime=on $POOL
zfs set xattr=sa $POOL
zfs set compression=lz4 $POOL
zfs set acltype=posixacl $POOL

Any chance to make this configurable in m-a?

It is all configurable in m-a. You can do a fully manual config if you don't use "auto". For the things that don't need to be done at creation time, you set these options in the m-a menus.

Alternatively, you can create your zpool and datasets outside of m-a and then just import the pool in m-a.

If you want something different, just let me know and I will look into it.

OK, uefi installs seem to work so I am guessing you did a bios/mbr install.

There seems to be an interesting bug there. It appears I am modifying the grub config file and then installing grub. Pretty sure that won't work. :smile:

I am working on it now.

I fixed it and submitted a merge request here:

1 Like

Yes, the virtualbox install was with legacy BIOS. In the meantime I installed it on my spare laptop with UEFI. That worked fine and was not needing any grub tweaks. The laptop is up and running on zfs. I love it!

I have two more question though:

  1. during installation with m-a it is asking if extra software needs to be installed. I picked linux56-zfs and zfs-utils. But I am wondering if these packages arent picked by default anyways. Can you tell?

  2. booting is working fine but I see the following error message at the beginning of the boot process:

cannot open 'rpool' : no such pool
no pools available to import

my zfs setup is like this:

1# zfs list
rpool       6,29G   205G       96K  none
rpool/home   184M   205G      176M  /home
rpool/root  6,11G   205G     6,08G  /

And the kernel command line looks like this:

2# cat /proc/cmdline 
BOOT_IMAGE=/root@/boot/vmlinuz-5.6-x86_64 root=ZFS=rpool/root rw zfs=rpool/root rw quiet udev.log_priority=3 zfs=rpool/root rw resume=/dev/disk/by-uuid/cff512cc-0b39-4cea-9bdc-ce7bb91f141e

There are little too many zfs options on that commandline from my point of view :wink:

What is this error message about? Is it possible to remove this message?

Merged. I'll rebuild the package tonight.

They used to be but I don't think they are anymore. I was planning to look at that today.

This appears in every Arch-based zfs on root install I have done. It isn't harmful. It is probably something in the zfs hook that gets built into the initramfs. I haven't looked into it but it is probably trying to import the pool after it has already been imported.

That is interesting, I can see the same thing in the test VM I setup yesterday. It must be grub doing that. It doesn't happen on my systemd-boot machines and GRUB_CMDLINE_LINUX_DEFAULT looks clean.

I am going to work on the module selection stuff today. Unless there is something else in there besides my changes you might want to wait for that.

1 Like

One more question:

In the Arch wiki it says

Set the bootfs property on the descendant root filesystem so the boot loader knows where to find the operating system.

zpool set bootfs=zroot/ROOT/default zroot

I did this during my installation. But is it neccessary to do it manually or is m-a taking care?

m-a will do it if you have it auto create the zfs pool and datasets. If you do that step manually or outside of m-a then it doesn't.

Forum kindly sponsored by