# Upgrade from 8.2 to 9.0 didn't upgrade ZFS



## underscore (Oct 4, 2012)

Hello,

I recently upgraded my homeserver from FreeBSD 8.2 to 9.0.
At first, it went wrong: as my root partition is on a ZFS volume which is on an encrypted geli partition, /boot on a SD-card, I forgot to upgrade the SD-card before rebooting. So I had to manually copy my encryption keys _and_ my zpool.cache over to the SD-card and fiddle with the loader.conf until the machine finally booted again.

However, since then I seem to have the same problem as described here: http://forums.freebsd.org/showthread.php?t=28825

My ZFS didn't upgrade:

```
# uname -a                                                                                                                                                                                                                             
FreeBSD zen.local 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 01:47:53 UTC 2012     
root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
```


```
# zpool upgrade -a                                                                                                                                                                                                                     
This system is currently running ZFS pool version 15.

All pools are formatted using this version.
```

But running freebsd-update doesn't do the trick for me:


```
# freebsd-update fetch                                                                                                                                                                                                                 
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 9.0-RELEASE from update4.FreeBSD.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

The following files are affected by updates, but no changes have
been downloaded because the files have been modified locally:
/var/db/mergemaster.mtree

No updates needed to update system to 9.0-RELEASE-p4.
```


```
# freebsd-update install                                                                                                                                                                                                               
No updates are available to install.
Run '/usr/sbin/freebsd-update fetch' first.
```

Is there any way to force reinstalling of the ZFS kernel modules?

Thanks!


----------



## phoenix (Oct 5, 2012)

Read the zpool(8) man page.  You have to manually upgrade pool version.

Then, read the zfs(8) man page.  You have to manually upgrade each filesystem.


----------



## underscore (Oct 5, 2012)

Hum, hope I don't miss something here, but I read both manpages and only found the upgrade command to do upgrades.

But this doesn't seem to work:


```
# zpool upgrade system
This system is currently running ZFS pool version 15.
```


```
# zfs upgrade system
0 filesystems upgraded
1 filesystems already at this version
```


```
# zpool upgrade -v
This system is currently running ZFS pool version 15.

The following versions are supported:

VER  DESCRIPTION
---  --------------------------------------------------------
 1   Initial ZFS version
 2   Ditto blocks (replicated metadata)
 3   Hot spares and double parity RAID-Z
 4   zpool history
 5   Compression using the gzip algorithm
 6   bootfs pool property
 7   Separate intent log devices
 8   Delegated administration
 9   refquota and refreservation properties
 10  Cache devices
 11  Improved scrub performance
 12  Snapshot properties
 13  snapused property
 14  passthrough-x aclinherit
 15  user/group space accounting
For more information on a particular version, including supported releases, see:

http://www.opensolaris.org/os/community/zfs/version/N

Where 'N' is the version number.
```


----------



## SNK (Oct 5, 2012)

Your kernel and world might be out of sync. Could you please run this:
`# strings /boot/kernel/kernel | sed -n 's|^\(FreeBSD [0-9][0-9.]*-*[^ ]*\).*|\1|p'`


----------



## underscore (Oct 5, 2012)

```
# strings /boot/kernel/kernel | sed -n 's|^\(FreeBSD [0-9][0-9.]*-*[^ ]*\).*|\1|p'
FreeBSD 9.0-RELEASE-p3
```

mysterious. The only thing I see is that world seems to be p4 and kernel p3. But would this make such a difference?


----------



## Orum (Oct 8, 2012)

underscore said:
			
		

> The only thing I see is that world seems to be p4 and kernel p3.



Some patch levels only update items in the world, and nothing in the kernel.  As such, if you're using freebsd-update, you will not get a new kernel, only an updated world.  Certain utilities like uname, which get their version information from the kernel, will not reflect the new patch level of the world.

Unfortunately, I'm still not sure why your zpool won't upgrade...


----------



## SNK (Oct 8, 2012)

Just compile the world and kernel I guess. Or you can keep looking for another solution which probably would take more time.


----------



## underscore (Oct 15, 2012)

Thanks! I did that, and it worked nicely!


----------

