Site icon UnixArena

How to upgrade zpool version on solaris ?

zpool/rpool upgrade on solaris

zpool version needs to be upgrade whenever you are performing the OS patching .Because the newer version of zpool offers the more functionality  and fixes a lot bugs. zpool upgrade can be performed on the fly without any impact to the data pools and rpool. But you need to consider lot of things prior the zpool upgrade. Because once you have upgrade the zpool, you can’t downgrade it . You may need to use the lower  version of zpool ,if you need to migrate those pools to lower patch level system. The higher version of the zpool can’t be used on the lower patch level systems. So think before upgrading it .

Here we will see how we can upgrade the data pool and rpool .

1.To see the maximum level of zpool version supported on the system,use zpool version upgrade command.

root@UAAIS:~# zpool upgrade -v
This system is currently running ZFS pool version 34.

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
 16  stmf property support
 17  Triple-parity RAID-Z
 18  Snapshot user holds
 19  Log device removal
 20  Compression using zle (zero-length encoding)
 21  Deduplication
 22  Received properties
 23  Slim ZIL
 24  System attributes
 25  Improved scrub stats
 26  Improved snapshot deletion performance
 27  Improved snapshot creation performance
 28  Multiple vdev replacements
 29  RAID-Z/mirror hybrid allocator
 30  Encryption
 31  Improved 'zfs list' performance
 32  One MB blocksize
 33  Improved share support
 34  Sharing with inheritance

For more information on a particular version, including supported releases,
see the ZFS Administration Guide.

root@UAAIS:~#

2.To check the current zpool version of specific zpool,

root@UAAIS:~# zpool get version oraz2
NAME   PROPERTY  VALUE  SOURCE
oraz2  version   27     local
root@UAAIS:~# zpool status oraz2
  pool: oraz2
 state: ONLINE
status: The pool is formatted using an older on-disk format. The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'. Once this is done, the
        pool will no longer be accessible on older software versions.
  scan: none requested
config:

        NAME      STATE     READ WRITE CKSUM
        oraz2     ONLINE       0     0     0
          c8t6d0  ONLINE       0     0     0

errors: No known data errors
root@UAAIS:~#

3.To upgrade the zpool to specific version ,use the below command.Here the existing zpool versionof oraz2 is 27 and it has been upgraded to 30.The maximum supported version of zpool is 34.

root@UAAIS:~# zpool upgrade -V 30 oraz2
This system is currently running ZFS pool version 34.

Successfully upgraded 'oraz2' from version 27 to version 30

root@UAAIS:~# zpool get version oraz2
NAME   PROPERTY  VALUE  SOURCE
oraz2  version   30     local
root@UAAIS:~#

4.To update the zpool version to maximum version, use zpool upgrade command.

root@UAAIS:~# zpool upgrade oraz2
This system is currently running ZFS pool version 34.

Successfully upgraded 'oraz2' from version 30 to version 34

root@UAAIS:~# zpool get version oraz2
NAME   PROPERTY  VALUE  SOURCE
oraz2  version   34     default
root@UAAIS:~#

5.Once you have upgraded ,then there is no way to downgrade it .Read the below messages carefully.

root@UAAIS:~# zpool upgrade
This system is currently running ZFS pool version 34.

The following pools are out of date, and can be upgraded.  After being
upgraded, these pools will no longer be accessible by older software versions.

VER  POOL
---  ------------
27   oraz2

Use 'zpool upgrade -v' for a list of available versions and their associated
features.
root@UAAIS:~#

But you can re-create the zpool with lower zpool version using the below command.

root@UAAIS:~# zpool create -o version=27 oraz2  c8t6d0
root@UAAIS:~# zpool get version oraz2
NAME   PROPERTY  VALUE  SOURCE
oraz2  version   27     local
root@UAAIS:~# zpool status oraz2
  pool: oraz2
 state: ONLINE
status: The pool is formatted using an older on-disk format. The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'. Once this is done, the
        pool will no longer be accessible on older software versions.
  scan: none requested
config:

        NAME      STATE     READ WRITE CKSUM
        oraz2     ONLINE       0     0     0
          c8t6d0  ONLINE       0     0     0

errors: No known data errors
root@UAAIS:~#

6.If you are planning to upgrade the rpool,please make sure you are running the “installgrub” on the rpool disk (X86).Otherwise system may not boot .Then you may need to boot with latest solaris DVD and run the “installgrub” to fix the booting issue.

 root@UAAIS:~# zpool upgrade rpool
This system is currently running ZFS pool version 34.

Pool 'rpool' is already formatted using the current version.
root@UAAIS:~#installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/dsk/c0t0d0s0

Note:For solaris 11, you no need to run “installgrub” command.

7.If the zpool is mirrored , make sure that you are running the “installgrub” for both the disks.

8.zpool upgrade just upgrades the zpools version and it won’t upgrade the zfs dataset versions.Here is the command to see the maximum zfs version supported on this machine.

root@UAAIS:~# zfs upgrade -v
The following filesystem versions are supported:

VER  DESCRIPTION
---  --------------------------------------------------------
 1   Initial ZFS filesystem version
 2   Enhanced directory entries
 3   Case insensitive and SMB credentials support
 4   userquota, groupquota properties
 5   System attributes
 6   Multilevel file system support

For more information on a particular version, including supported releases,
see the ZFS Administration Guide.

root@UAAIS:~#

9.Like zpool, you can also upgrade the zfs to specific version.

root@UAAIS:~# zfs upgrade -V 5 oraz1/oracle4
1 filesystems upgraded
root@UAAIS:~# zfs get version oraz1/oracle4
NAME           PROPERTY  VALUE  SOURCE
oraz1/oracle4  version   5      -
root@UAAIS:~#

10.You can upgrade the zfs to maximum versions that supported by this system.

root@UAAIS:~# zfs get version oraz1/oracle4
NAME           PROPERTY  VALUE  SOURCE
oraz1/oracle4  version   5      -
root@UAAIS:~# zfs upgrade oraz1/oracle4
1 filesystems upgraded
root@UAAIS:~# zfs get version oraz1/oracle4
NAME           PROPERTY  VALUE  SOURCE
oraz1/oracle4  version   6      -
root@UAAIS:~#

11.You have option also to create the lower version of zfs dataset .

root@UAAIS:~# zfs create -o version=4 oraz1/oracle4
root@UAAIS:~# zfs get version oraz1/oracle4
NAME           PROPERTY  VALUE  SOURCE
oraz1/oracle4  version   4      -
root@UAAIS:~#

12.To upgrade the all zpool and zfs to maximum software version.

root@UAAIS:~# zpool upgrade -a
This system is currently running ZFS pool version 34.

Successfully upgraded 'oraz2'

root@UAAIS:~# 
root@UAAIS:~# zfs upgrade -r oraz2
0 filesystems upgraded
1 filesystems already at this version
root@UAAIS:~#

The above commands upgraded the all the zpools to the newer version and upgraded the all dataset to higher version on zpool oraz2.

Hope this article will help you to upgrade the zpools on your environemnt.

Share it ! comment it !! Be sociable !!!

Exit mobile version