ZFS on Linux is still an in-development software and has reasonably frequent updates. It is often useful to update the zfs software without resorting to a full reinstallation of a system. This section will describe how to do that and at the same time make sure the roll is in the local cluster distribution.
This version of the zfs-linux roll requires you to manually build and add the binary version of the roll.
The roll follows the process at http://zfsonlinux.org to build rpms. This has the effect of installing zfs kernel modules on your frontend. If you do not want this, then you should build on a development server appliance. |
If the ZFS source roll is not available for the version of ZFS-on-Linux that you require, then you should go to github.com so that you can first create a source roll. In particular, https://github.com/rocksclusters/zfs-linux. You should clone the repository. THe following shows read-only access to the github repository.
# git clone https://github.com/rocksclusters/zfs-linux.git |
At this point, you have cloned the repository locally. You will need to populate the source tarballs.
# cd zfs-linux # make download |
If the version of spl/zfs is NOT the one you want, then you need to download/create tarballs of spl and zfs and edit zfs-version.mk in the top level. The following is an example of how to create the tarball for spl
Here we will use an update from version 0.6.4.1 to 0.6.5.2 of the roll. This assumes you have downloaded a newer source roll (a source roll is one in which the ZFS binaries have not already been built for your system). The particular steps will accomplish the source roll installation so that you can build the binary roll
# (cd /opt/zfs/zfs-linux-roll-source; make clean) # rocks remove roll zfs-linux # rocks add roll zfs-linux-*0.6.5.2*iso # rocks enable roll zfs-linux # cd /export/rocks/install; rocks create distro # yum clean all; yum update zfs-source-roll |
Now that you have updated the source version of the Roll, you need to rebuild the binary roll.
# cd /opt/zfs/zfs-linux-roll-source; make binary-roll # rocks add roll zfs-linux-*0.6.5.2*iso # cd /export/rocks/install; rocks create distro # yum clean all; yum update |
It is possible that you will see errors on rebuilding the binary roll on a system with ZFS running if you see a screen that looks like:
|
Please see the section on "Installing the Roll" to see a proper build. Remember to add the binary roll (iso image) that was created above and then recreate the distribution on the frontend As a quick reference you should do the following to update the zfs roll with the version you just created. Removal of the old roll is recommended.
|
Now that your updated binary has been created and you have properly rebuilt the distribution, you can update the RPMS of a system that has its ZFS RPMS already installed. If ZFS is running on a node it is recommended to first stop zfs and then unload the zfs modules (this works also for a frontend)
# zfs umount -a # service zfs-zed stop # rmmod zfs zcommon znvpair zavl zunicode spl zlib_deflate |
At this point, ZFS is no longer active and can be updated. The following should properly accomplish the update
# yum clean all # yum update zfs # modprobe zfs |
The following, very long screen dump illustrates the output of the update process.
# yum update zfs Setting up Update Process Rocks-6.1 | 3.6 kB 00:00 Rocks-6.1/primary_db | 2.3 MB 00:00 Resolving Dependencies --> Running transaction check ---> Package zfs.x86_64 0:0.6.5-1.el6 will be updated --> Processing Dependency: zfs(x86-64) = 0.6.5-1.el6 for package: zfs-test-0.6.5-1.el6.x86_64 --> Processing Dependency: zfs(x86-64) = 0.6.5-1.el6 for package: zfs-dracut-0.6.5-1.el6.x86_64 ---> Package zfs.x86_64 0:0.6.5.2-1.el6 will be an update --> Processing Dependency: zfs-kmod = 0.6.5.2 for package: zfs-0.6.5.2-1.el6.x86_64 --> Processing Dependency: libzpool2 = 0.6.5.2 for package: zfs-0.6.5.2-1.el6.x86_64 --> Processing Dependency: libzfs2 = 0.6.5.2 for package: zfs-0.6.5.2-1.el6.x86_64 --> Processing Dependency: libuutil1 = 0.6.5.2 for package: zfs-0.6.5.2-1.el6.x86_64 --> Processing Dependency: libnvpair1 = 0.6.5.2 for package: zfs-0.6.5.2-1.el6.x86_64 --> Running transaction check ---> Package kmod-zfs-2.6.32-573.3.1.el6.x86_64.x86_64 0:0.6.5-1.el6 will be updated ---> Package kmod-zfs-2.6.32-573.3.1.el6.x86_64.x86_64 0:0.6.5.2-1.el6 will be an update ---> Package libnvpair1.x86_64 0:0.6.5-1.el6 will be updated ---> Package libnvpair1.x86_64 0:0.6.5.2-1.el6 will be an update ---> Package libuutil1.x86_64 0:0.6.5-1.el6 will be updated ---> Package libuutil1.x86_64 0:0.6.5.2-1.el6 will be an update ---> Package libzfs2.x86_64 0:0.6.5-1.el6 will be updated ---> Package libzfs2.x86_64 0:0.6.5.2-1.el6 will be an update ---> Package libzpool2.x86_64 0:0.6.5-1.el6 will be updated ---> Package libzpool2.x86_64 0:0.6.5.2-1.el6 will be an update ---> Package zfs-dracut.x86_64 0:0.6.5-1.el6 will be updated ---> Package zfs-dracut.x86_64 0:0.6.5.2-1.el6 will be an update ---> Package zfs-test.x86_64 0:0.6.5-1.el6 will be updated ---> Package zfs-test.x86_64 0:0.6.5.2-1.el6 will be an update --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================== Package Arch Version Repository Size ============================================================================================================== Updating: zfs x86_64 0.6.5.2-1.el6 Rocks-6.1 340 k Updating for dependencies: kmod-zfs-2.6.32-573.3.1.el6.x86_64 x86_64 0.6.5.2-1.el6 Rocks-6.1 601 k libnvpair1 x86_64 0.6.5.2-1.el6 Rocks-6.1 73 k libuutil1 x86_64 0.6.5.2-1.el6 Rocks-6.1 76 k libzfs2 x86_64 0.6.5.2-1.el6 Rocks-6.1 288 k libzpool2 x86_64 0.6.5.2-1.el6 Rocks-6.1 1.2 M zfs-dracut x86_64 0.6.5.2-1.el6 Rocks-6.1 11 k zfs-test x86_64 0.6.5.2-1.el6 Rocks-6.1 45 k Transaction Summary ============================================================================================================== Upgrade 8 Package(s) Total download size: 2.6 M Downloading Packages: (1/8): kmod-zfs-2.6.32-573.3.1.el6.x86_64-0.6.5.2-1.el6.x86_64.rpm | 601 kB 00:00 (2/8): libnvpair1-0.6.5.2-1.el6.x86_64.rpm | 73 kB 00:00 (3/8): libuutil1-0.6.5.2-1.el6.x86_64.rpm | 76 kB 00:00 (4/8): libzfs2-0.6.5.2-1.el6.x86_64.rpm | 288 kB 00:00 (5/8): libzpool2-0.6.5.2-1.el6.x86_64.rpm | 1.2 MB 00:00 (6/8): zfs-0.6.5.2-1.el6.x86_64.rpm | 340 kB 00:00 (7/8): zfs-dracut-0.6.5.2-1.el6.x86_64.rpm | 11 kB 00:00 (8/8): zfs-test-0.6.5.2-1.el6.x86_64.rpm | 45 kB 00:00 -------------------------------------------------------------------------------------------------------------- Total 49 MB/s | 2.6 MB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Updating : libuutil1-0.6.5.2-1.el6.x86_64 1/16 Updating : libnvpair1-0.6.5.2-1.el6.x86_64 2/16 Updating : libzpool2-0.6.5.2-1.el6.x86_64 3/16 Updating : libzfs2-0.6.5.2-1.el6.x86_64 4/16 Updating : kmod-zfs-2.6.32-573.3.1.el6.x86_64-0.6.5.2-1.el6.x86_64 5/16 Updating : zfs-0.6.5.2-1.el6.x86_64 6/16 Updating : zfs-test-0.6.5.2-1.el6.x86_64 7/16 Updating : zfs-dracut-0.6.5.2-1.el6.x86_64 8/16 Cleanup : zfs-dracut-0.6.5-1.el6.x86_64 9/16 Cleanup : zfs-test-0.6.5-1.el6.x86_64 10/16 Cleanup : kmod-zfs-2.6.32-573.3.1.el6.x86_64-0.6.5-1.el6.x86_64 11/16 Cleanup : zfs-0.6.5-1.el6.x86_64 12/16 Cleanup : libzfs2-0.6.5-1.el6.x86_64 13/16 Cleanup : libzpool2-0.6.5-1.el6.x86_64 14/16 Cleanup : libnvpair1-0.6.5-1.el6.x86_64 15/16 Cleanup : libuutil1-0.6.5-1.el6.x86_64 16/16 Verifying : libnvpair1-0.6.5.2-1.el6.x86_64 1/16 Verifying : libzfs2-0.6.5.2-1.el6.x86_64 2/16 Verifying : zfs-test-0.6.5.2-1.el6.x86_64 3/16 Verifying : libzpool2-0.6.5.2-1.el6.x86_64 4/16 Verifying : kmod-zfs-2.6.32-573.3.1.el6.x86_64-0.6.5.2-1.el6.x86_64 5/16 Verifying : libuutil1-0.6.5.2-1.el6.x86_64 6/16 Verifying : zfs-0.6.5.2-1.el6.x86_64 7/16 Verifying : zfs-dracut-0.6.5.2-1.el6.x86_64 8/16 Verifying : zfs-test-0.6.5-1.el6.x86_64 9/16 Verifying : zfs-dracut-0.6.5-1.el6.x86_64 10/16 Verifying : kmod-zfs-2.6.32-573.3.1.el6.x86_64-0.6.5-1.el6.x86_64 11/16 Verifying : libuutil1-0.6.5-1.el6.x86_64 12/16 Verifying : libzpool2-0.6.5-1.el6.x86_64 13/16 Verifying : zfs-0.6.5-1.el6.x86_64 14/16 Verifying : libnvpair1-0.6.5-1.el6.x86_64 15/16 Verifying : libzfs2-0.6.5-1.el6.x86_64 16/16 Updated: zfs.x86_64 0:0.6.5.2-1.el6 Dependency Updated: kmod-zfs-2.6.32-573.3.1.el6.x86_64.x86_64 0:0.6.5.2-1.el6 libnvpair1.x86_64 0:0.6.5.2-1.el6 libuutil1.x86_64 0:0.6.5.2-1.el6 libzfs2.x86_64 0:0.6.5.2-1.el6 libzpool2.x86_64 0:0.6.5.2-1.el6 zfs-dracut.x86_64 0:0.6.5.2-1.el6 zfs-test.x86_64 0:0.6.5.2-1.el6 Complete! |
You may see an error that lsscsi package does not exist. This is because the package is not part of the standard OS roll, but is part of the CentOS Distribution. To fix this problem
# yum --enablerepo=base install lsscsi # yum update # reboot |