kernel-tools icon indicating copy to clipboard operation
kernel-tools copied to clipboard

Enable ZFS filesystem kernel support for Ubuntu images

Open simos opened this issue 7 years ago • 15 comments

UPDATE: 4 Dec 2019 Scaleway has updated their cloud images so that the Ubuntu systems will be running the Ubuntu Linux kernel (hence, ZFS support out of the box)! This works fine with their VPS servers.

However, the old baremetal servers (C2-class, Atom-based) do not support the Ubuntu Linux kernel out of the box. The available bootscripts are only for unpatched mainline kernels. Therefore, even if you setup Ubuntu, you do not get the full Ubuntu distribution (that is, you do not get the Ubuntu Linux kernel).

The non-C1/C2 baremetal servers do use the official Ubuntu Linux kernels, therefore there is ZFS support (thanks @lostnet for verifying).

Below is the original issue description.

In Ubuntu 16.04 and newer, the Linux kernel comes with ZFS kernel support. ZFS is not maintained in mainline Linux and is added while compiling the kernel.

ZFS is important to Ubuntu because it is required in LXD containers. Regarding licensing issues, https://insights.ubuntu.com/2016/02/18/zfs-licensing-and-linux/

However, in the Scaleway "Ubuntu" kernels, there is no ZFS support and it has to be added later by the customer. The process is cumbersome and error-prone. There should be ZFS support in the Ubuntu images as it is expected to work when you select Ubuntu.

simos avatar Apr 28 '17 09:04 simos

I'll be getting off scaleway until ZFS works.

I'm aware you can compile your own kernel with ZFS, but why would I deal with the mess of trying to install custom kernels on 20+ VM's.

If you're going to use your own kernels, don't strip features that are included by default in one of the most widely used Linux Distros.

beetahnator avatar May 06 '17 18:05 beetahnator

Scaleway, please fix.

This is stupid!

rigred avatar Jun 30 '17 15:06 rigred

@scaleway

Why?

streaps avatar Jul 13 '17 21:07 streaps

Here is some easy to install workaround for Ubuntu

https://github.com/stuffo/scaleway-ubuntukernel/blob/master/ubuntukernel-load.sh

streaps avatar Jul 13 '17 23:07 streaps

Yes please add it, until then have fun....

ea2809 avatar Aug 02 '17 13:08 ea2809

I have successfully installed ZFS C2M with 4.4.94-mainline-rev1 kernel First: apt-get install build-essential libssl-dev

Then, run the script from the article https://github.com/scaleway/kernel-tools#how-to-build-a-custom-kernel-module

Afrter that:

export KDIR=/lib/modules/$(uname -r)/build/
apt-get install zfsutils-linux -y

habib-the-sweet avatar Oct 25 '17 14:10 habib-the-sweet

@habib-the-sweet : For the x86 VPS systems at Scaleway, the instructions are rather straightforward (https://blog.simos.info/how-to-install-lxd-containers-on-ubuntu-on-scaleway/).

For the ARM systems, they are more involved, https://blog.simos.info/a-closer-look-at-the-new-arm64-scaleway-servers-and-lxd/

In both cases, if you want to upgrade the kernel, you can end up with downtime of several hours to get ZFS back up.

The Ubuntu 16.04 (or newer) Linux kernel is supposed to have ZFS support.

simos avatar Oct 25 '17 16:10 simos

Still no ZFS...

buckle2000 avatar Feb 23 '18 05:02 buckle2000

Scaleway supports CONFIG_KEXEC on the x86 servers, which means that it is feasible to boot the Ubuntu Linux kernel, once the VPS/server is up and running. The process is somewhat involved, and I could not find any official documentation.

I looked into posts that managed to get it working, and wrote it up on my blog, https://blog.simos.info/how-to-run-the-stock-ubuntu-linux-kernel-on-scaleway-using-kexec-and-server-tags/

With this, you can boot into the Ubuntu Linux kernel, and ZFS is supported just fine!

simos avatar Feb 23 '18 13:02 simos

still nothing...

xifi-kif avatar Nov 02 '18 17:11 xifi-kif

@xifi-kif If you launch a new Scaleway server, then it will use the official stock Ubuntu Linux kernel and everything works fine.

simos avatar Dec 18 '18 11:12 simos

@simos I just launched a scaleway C2 server and it has only mainline kernels as bootscript choices. The ubuntu kernel is physically present and could theoretically be kexec'd but as per your blog entry above, this is apparently not ok on baremetal without a process to modify the initramfs etc for nbd..

lostnet avatar Dec 04 '19 08:12 lostnet

@lostnet I just launched a Scaleway C2S server (Atom CPU) with Ubuntu 18.04. Indeed, the default Linux kernel is

# uname -a
Linux scw-expendible-baremetal 4.9.93-mainline-rev1 #1 SMP Tue Apr 10 09:48:45 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

There is no bootscript to choose an Ubuntu Linux kernel, therefore there is no effortless way to setup ZFS.

My view is that those C2 baremetal servers are likely to be phased out and they are not being updated. I do not see them at the Scaleway baremetal server page. You can only launch them when you log in into your Scaleway account.

When you try any of the servers from the baremetal server page (those that cost quite a bit), do they come with an Ubuntu Linux kernel or is it still those unpatched kernels?

simos avatar Dec 04 '19 13:12 simos

@simos The newer baremetal offering GP-BM1-M (as opposed to the region integrated C1/C2 baremetal instances) seem to use real ubuntu kernels but defaults to ext4, so I was able to put a pool on one of the drives and do a non-root mount of a dataset. This offering aside from being only large/expensive instances doesn't work with flexible ips, etc, so its more like an upgrade transition for the older online.net dedicated servers than a replacement for C2 servers.

lostnet avatar Dec 04 '19 14:12 lostnet

@lostnet Thanks, I updated the original description of this issue. I am not closing this issue as long as the C2 baremetal servers are available by Scaleway, and they are not using the Ubuntu Linux kernels for their Ubuntu images.

simos avatar Dec 04 '19 15:12 simos