ZFS: Upgrading
Last week we walked through setting up a ZFS mirror. This week we’ll talk about upgrading zfs. Note I’m using Arch Linux, which has a rolling release model, so I update fairly frequently.
We need to take care when performing updates now because ZFS depends on the kernel version we are on, so upgrading is not as simple as it used to be. If the kernel updates, ZFS needs to be updated with a version built on the new kernel. Since we are only using ZFS on our home directory I think we could get away with uninstalling ZFS and it’s dependancies, updating, reinstalling things, then just remount the zpool, but this seems inefficient to me.
I’ve come to learn that there is an unofficial user repository run by demizer. We will add this to our pacman.conf and use it to perform upgrades.
Adding an Unofficial User Repository
We first need to add the unofficial repo to our pacman.conf. Add the following
to /etc/pacman.conf
:
# demizer's ZFS repo
[archzfs]
Server = http://archzfs.com/$repo/x86_64
Now we need to sign the key.
$ sudo pacman-key -r 0EE7A126
[sudo] password for koopman:
gpg: key 0EE7A126: public key "Jesus Alvarez <jeezusjr@gmail.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
==> Updating trust database...
gpg: next trustdb check due at 2016-01-22
We can verify the fingerprint by running the following and checking the last 8 digits of the fingerprint match the ID.
$ sudo pacman-key -f 0EE7A126
[sudo] password for koopman:
pub rsa2048/0EE7A126 2012-10-24
Key fingerprint = B18A 9C9F 1E4E EAFF 072D AB9E 5E1A BF24 0EE7 A126
uid [ unknown] Jesus Alvarez <jeezusjr@gmail.com>
sub rsa2048/DAB97A2B 2012-10-24
Finally, we’ll sign the key:
$ sudo pacman-key --lsign-key 0EE7A126
-> Locally signing key 0EE7A126...
==> Updating trust database...
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 6 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1 valid: 6 signed: 62 trust: 1-, 0q, 0n, 5m, 0f, 0u
gpg: depth: 2 valid: 62 signed: 5 trust: 62-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2016-01-22
Updating
Now when we run pacman -Syy
we’ll see the new repo:
$ sudo pacman -Syy
:: Synchronizing package databases...
core 121.4 KiB 826K/s 00:00 [################################] 100%
extra 1800.5 KiB 2.55M/s 00:01 [################################] 100%
community 2.6 MiB 2.58M/s 00:01 [################################] 100%
multilib 125.0 KiB 2.84M/s 00:00 [################################] 100%
archzfs 7.6 KiB 136K/s 00:00 [################################] 100%
archzfs.sig 287.0 B 0.00B/s 00:00 [################################] 100%
And since we just ran pacman -Syy
we should update with pacman -Syu
. If you
notice a kernel update you should check that the latest version of ZFS matches.
demizer does a great job of keeping the repo up to date when a new kernel
version is released, but he’s only human, so sometimes the repo might not be
caught up yet. In this case I usually just wait a little bit.
Now upgrading is nearly as easy as it used to be. I hope your ZFS setup is working as smoothly as mine has been. Next week I’ll cover asynchronous automated scrubbing of a zpool.