Upgrade Kernel to 4.16

I was considering upgrading my kernel, as it seems like there has been a lot of good changes since 4.12. Here are the steps I am considering. I’ve tried this out on a VM, and it seemed to go fine, but just wanted to check and see if anyone spotted anything glaring before I roll this to my prod.

Get dev/build tools

yum group install “Development Tools”

yum install asciidoc.noarch e2fsprogs-devel.x86_64 libblkid-devel.x86_64 zlib-devel.x86_64 libzstd-devel.x86_64 lzo-devel.x86_64 xmlto.x86_64 wget zeromq3-devel python-pip python34-devel python-devel libpqxx-devel.x86_64 git

Grab the latest btrfs-progs source, configure, make, and install:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git

cd btrfs-progs/

./autogen.sh

./configure

make

make install

Get the latest kernel, and load it in:

wget http://elrepo.org/linux/kernel/el7/x86_64/RPMS/kernel-ml-4.16.7-1.el7.elrepo.x86_64.rpm

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -i kernel-ml-4.16.7-1.el7.elrepo.x86_64.rpm

Update the rockstor settings file to show the supported kernel:

vi /opt/rockstor/src/rockstor/settings.py

Find the line with SUPPORTED_KERNEL_VERSION, and change to:

SUPPORTED_KERNEL_VERSION = ‘4.16.7-1.el7.elrepo.x86_64’

Update grub to boot from the new kernel:

grub2-set-default 0
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-editenv list

Reboot the machine, and cross fingers :slight_smile:

4 Likes

I’m patiently awaiting a kernel upgrade to Rorcstor, in order to get the latest Btrfs version.

It seems there have been so many improvements to Btrfs that it would be worth the while to do the upgrade.

If this works for you, please keep us updated, as I could possibly try the same steps.

The only thing I might do differently, is to install my freshly rolled btrfs tools into a different prefix, but that might be nitpicky and more trouble than it’s worth.

Do keep us posted about the results, I’d like to know if this is a viable strategy.

I am out of town this weekend, but I’ll be giving this a go sometime next week. I’ve run through the steps three times now on a VM, and all seems ok.

Just wanted to post back that I’ve done this now. Haven’t had time to put it through any tests yet, but seems stable enough.

@suman already 4.17 ist out…

Can you give us any guidance when one of the next rockstor releases will have a new kernel in it? :thinking:

As always - Thanks :smiley:

So I’ve been running for two weeks now, and it seems very stable. Haven’t noticed any issues at all.

1 Like

@suman and @phillxnet
With reference to my previous post

4.17.3 is out (stable) and 4.18 is currently in RC2 status
-> are there currently any kernel tests ongoing on your side?
-> when do you expect the next kernel upgrade will come through the rockstor update channel?

I guess there would be a larger interest by all Rockstor users to get this upgrade (bug fixes and performance enhancements) through one of the next official Rockstor releases compared to individual upgrades like done by @kupan787.

Thanks for sharing your feedback with the community!

j’ai actuellement la 4.17.3 avec Rockstor 3.9.2.28 et je n’ai pas constaté de probleme

I currently have 4.17.3 with Rockstor 3.9.2.28 and I have not seen any problem

2 Likes

Hi Matt
(FR) Je vais regarder que je te tien au courant en samedi
(En) Hi Matt
I’ll watch that I’ll let you know on Saturday

@suman or @phillxnet
sorry for insisting here, but as there was again no statement with regards to a possible upcoming kernel upgrade from your side herewith another trial to get your feedback :pray: THX

I’ve just done this too although I’m rolling kernel 4.18.5-1 paired with btrfs-progs v4.17.1
Was entirely a requirement as my new i3 coffee lake outright wouldn’t boot with 4.12, and refused to load my NIC in 4.10

No issues so far, I think given the state of BTRFS development we should really be rolling close to bleeding edge here.

For everyone else’s benefit - I needed to yum install python34-setuptools before make was happy.

2 Likes

So - kernel manually downloaded, btrfstools built from source, as detailed by @kupan787 in the topic start, with the python-setuptools in between? I really should make the time to just go for it, really…

I went with enabling the kernel-ml package, but functionally it doesn’t really matter. python34-setuptools install can happen with everything else earlier.

It’s fairly low risk since the old kernels are still there to boot to if something goes wrong and you need to revert.

Edit: you can also skip compiling btrfs-progs entirely, but you’ll miss out on whatever bugfixes there are, of course.

thanks!
I still see the ball @ the rockstor owners to implement, it has been a long time since the last kernel update, so it is anyhow time…I’ll wait a bit more before investigating/applying on my own as well

Edit:
My previous attempts to get feedback from @suman were not fruitful at all :cry:

1 Like

@kupan787

I’ve tried to upgrade as well, but at the progs section I get the following error while running the “autogen” command - any advise?

[root@rockstor btrfs-progs]# ./autogen.sh

You must have autoconf installed to generate btrfs-progs build system.

You must have autoheader installed to generate btrfs-progs build system.
The autoheader command is part of the GNU autoconf package.

You must have automake installed to generate btrfs-progs build system.

Also when I try to edit the setting via

vi /opt/rockstor/src/rockstor/settings.py

I can change the text, but how can I save and exit this view?

Thx

Did you run the first step for the development tools?

Get dev/build tools

yum group install “Development Tools”

That should get you everything install that you need.

Using vi can be tricky, it has a lot of commands. After you have changes/entered any text, you need to hit ESC on the keyboard to exit the insert mode. Then hit : and type wq. This will write out the output and quit vi.

Alternatively, you can use nano:

nano /opt/rockstor/src/rockstor/settings.py

which can be a bit easier to move around in.

FYI, look like kernel 4.20 is soon to be made available, and contains a number of new fixes.

I’m not sure what kernel rockstor is currently packaged on, but I’m on 4.19, and plan on upgrade to 4.20 as soon as it is available.

So I have upgraded to 4.20, and so far so good. I think I’ve got the process a bit simplified.

This will install the kernel via yum, instead of a manual download:

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
yum -y --enablerepo=elrepo-kernel install kernel-ml

kernelvers=`rpm -qa | grep -i kernel-ml-4.20 | cut -c 11-`
sed -i "/SUPPORTED_KERNEL_VERSION/c\SUPPORTED_KERNEL_VERSION = '${kernelvers}'" /opt/rockstor/src/rockstor/settings.py

grub2-set-default 0
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-editenv list

Build and install the BTRFS tools.

yum -y group install "Development Tools"
yum -y install xmlto.x86_64 asciidoc.noarch e2fsprogs-devel.x86_64 libblkid-devel.x86_64 zlib-devel.x86_64 libzstd-devel.x86_64 python34-devel lzo-devel.x86_64 python34-setuptools

cd
mkdir src
cd src

git clone git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
cd btrfs-progs/
./autogen.sh
./configure --prefix=/usr/sbin
make
make install

The above for BTRFS progs assumes you didn’t pull down the source before. If you did, then it should be as simple as:

cd ~/src/btrfs-progs/
git pull
./autogen.sh
./configure --prefix=/usr/sbin
make
make install
2 Likes

I followed this guide, and it looked like it worked.

The kernel is reported as “4.20.0-1.el7.elrepo.x86_64” by the rockstor web interface.

But when I run “btrfs version”, in a ssh session i get “btrfs-progs v4.12”

So it seems btrfs progs weren’t updated?

Where could I have gone wrong. I didn’t see any error messages, but would also not know what to be looking for :slight_smile:

Rockstor is up and running and everything seems OK, so so far so good …