scaleway / kernel-tools

:penguin: Kernels on Scaleway
http://devhub.scaleway.com/#/bootscripts
MIT License
104 stars 36 forks source link

Enable ZFS filesystem kernel support for Ubuntu images #346

Open simos opened 7 years ago

simos commented 7 years ago

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.

beetahnator commented 7 years ago

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.

rigred commented 7 years ago

Scaleway, please fix.

This is stupid!

streaps commented 7 years ago

@scaleway

Why?

streaps commented 7 years ago

Here is some easy to install workaround for Ubuntu

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

ea2809 commented 7 years ago

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

habib-the-sweet commented 7 years ago

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
simos commented 7 years ago

@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.

buckle2000 commented 6 years ago

Still no ZFS...

simos commented 6 years ago

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!

xifi-kif commented 6 years ago

still nothing...

simos commented 5 years ago

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

lostnet commented 4 years ago

@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..

simos commented 4 years ago

@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?

lostnet commented 4 years ago

@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.

simos commented 4 years ago

@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.