Note

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Difference between revisions of "ZFS Update"

From Funtoo
Jump to navigation Jump to search
Line 1: Line 1:
Newer versions of ZFS introduce bug fixes, support for newer kernels, and in some instances, introduce new storage pool features.
Newer versions of ZFS introduce bug fixes, support for newer kernels, and in some instances, introduce new storage pool features.


Portage will update these packages in the normal fashion through {{c|emerge --update @world}}. Important '''additional steps''' will be required for Funtoo Linux installed on a ZFS storage pool.
Portage will update these packages in the normal fashion through {{c|emerge --update @world}}. Important '''additional steps''' are often required for Funtoo Linux installed on a ZFS storage pool.


<nowiki>*</nowiki> The ZFS ebuilds are {{c|sys-fs/zfs}}, {{c|sys-fs/zfs-kmod}} and {{c|sys-kernel/spl}}.
<nowiki>*</nowiki> The ZFS ebuilds are {{c|sys-fs/zfs}}, {{c|sys-fs/zfs-kmod}} and {{c|sys-kernel/spl}}.
Line 8: Line 8:


===Funtoo installed on ZFS===
===Funtoo installed on ZFS===
{{warning|work in progress}}
Special attention should be given when updating ZFS with Funtoo Linux installed onto ZFS: i.e. root (/) resides in a storage pool. In particular, '''initramfs''' responsible for importing and mounting root (/) during boot ideally should be updated ''prior to'' rebooting. Placing the updated executables ({{c|/sbin/zpool}}, {{c|/sbin/zfs}}) in your initramfs will reduce the likelihood of boot failure. Updating initramfs may require the updating of bootloader or UEFI configuration.


GRUB vs UEFI vs static kernels
====...with GRUB====
For typical installations, GRUB can support {{f|/boot}} residing within a ZFS storage pool (together with root {{f|/}}). There is an official installation guide for this configuration: [[ZFS Install Guide]].


====(Optional) Update GRUB?====
Updating from old versions of ZFS (0.6.3 or older) will introduce new storage pool features. Old versions of GRUB may not be able to support {{f|/boot}} residing on a pool that utilizes these latest features. To reduce the likelihood of boot failure, GRUB should be ''updated'' before upgrading storage pools.
review installed GRUB > recommend to update first if old version
(new sys-boot/grub has better zfs support)


====Identify existing ZFS version====
Once Portage has completed updating the ZFS packages, review the status of your root storage pool. Here, this is assumed to be {{c|rpool}} and when upgrading from old ZFS may indicate the availability of new features.
Details...
 
====If upgrading from ZFS 0.6.4.2 or newer====
Normal upgrade
* Merge new zfs
* Update initramfs
* grub-mkconfig
* reboot
 
====If upgrading from ZFS 0.6.3.x or older====
Details...
* as above
* warning about features
* zpool status, zpool upgrade rpool


{{console|body=
{{console|body=
Line 50: Line 35:
errors: No known data errors
errors: No known data errors
}}
}}
'''Instructions:'''
To reduce the likelihood of your system from to boot with this new ZFS:
# For now, ignore the option to upgrade the storage pool {{C|rpool}}.
# Update your initramfs to include the latest ZFS binary executables.
# Ensure and if possible upgrade {{Package|sys-boot/grub}} to the latest version. Follow [[Install]] for instructions on how to install GRUB.
# Confirm that you are able to successfully reboot following these updates.
====Updating (root) Storage Pool Features====
{{warning|work in progress..}}


{{console|body=
{{console|body=

Revision as of 02:44, October 14, 2016

Newer versions of ZFS introduce bug fixes, support for newer kernels, and in some instances, introduce new storage pool features.

Portage will update these packages in the normal fashion through emerge --update @world. Important additional steps are often required for Funtoo Linux installed on a ZFS storage pool.

* The ZFS ebuilds are sys-fs/zfs, sys-fs/zfs-kmod and sys-kernel/spl.

   Important

As best practice, it is strongly recommended that all users backup their data on a regular basis - irrespective of the file system being used. This could be particularly important should something go wrong while modifying or updating a live file system.

Funtoo installed on ZFS

Special attention should be given when updating ZFS with Funtoo Linux installed onto ZFS: i.e. root (/) resides in a storage pool. In particular, initramfs responsible for importing and mounting root (/) during boot ideally should be updated prior to rebooting. Placing the updated executables (/sbin/zpool, /sbin/zfs) in your initramfs will reduce the likelihood of boot failure. Updating initramfs may require the updating of bootloader or UEFI configuration.

...with GRUB

For typical installations, GRUB can support /boot residing within a ZFS storage pool (together with root /). There is an official installation guide for this configuration: ZFS Install Guide.

Updating from old versions of ZFS (0.6.3 or older) will introduce new storage pool features. Old versions of GRUB may not be able to support /boot residing on a pool that utilizes these latest features. To reduce the likelihood of boot failure, GRUB should be updated before upgrading storage pools.

Once Portage has completed updating the ZFS packages, review the status of your root storage pool. Here, this is assumed to be rpool and when upgrading from old ZFS may indicate the availability of new features.

root # zpool status
  pool: rpool
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
	still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
	the pool may no longer be accessible by software that does not support
	the features. See zpool-features(5) for details.
  scan: none requested
config:

	NAME                                             STATE     READ WRITE CKSUM
	rpool                                            ONLINE       0     0     0
	  ata-Samsung_SSD_840_EVO_120GB_123456789ABCDEF  ONLINE       0     0     0

errors: No known data errors

Instructions:

To reduce the likelihood of your system from to boot with this new ZFS:

  1. For now, ignore the option to upgrade the storage pool rpool.
  2. Update your initramfs to include the latest ZFS binary executables.
  3. Ensure and if possible upgrade No results to the latest version. Follow Install for instructions on how to install GRUB.
  4. Confirm that you are able to successfully reboot following these updates.

Updating (root) Storage Pool Features

   Warning

work in progress..

root # zpool upgrade
This system supports ZFS pool feature flags.

All pools are formatted using feature flags.


Some supported features are not enabled on the following pools. Once a
feature is enabled the pool may become incompatible with software
that does not support the feature. See zpool-features(5) for details.

POOL  FEATURE
---------------
rpool
      async_destroy
      empty_bpobj
      lz4_compress
      spacemap_histogram
      enabled_txg
      hole_birth
      extensible_dataset
      embedded_data
      bookmarks
      filesystem_limits
      large_blocks
root # zpool upgrade rpool
This system supports ZFS pool feature flags.

Enabled the following features on 'rpool':
  async_destroy
  empty_bpobj
  lz4_compress
  spacemap_histogram
  enabled_txg
  hole_birth
  extensible_dataset
  embedded_data
  bookmarks
  filesystem_limits
  large_blocks
root # zpool status
  pool: rpool
 state: ONLINE
  scan: none requested
config:

	NAME                                             STATE     READ WRITE CKSUM
	rpool                                            ONLINE       0     0     0
	  ata-Samsung_SSD_840_EVO_120GB_123456789ABCDEF  ONLINE       0     0     0

errors: No known data errors