The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "ZFS Update"
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Newer versions of ZFS | Newer versions of ZFS resolve bugs, add 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 | Portage will update these packages in the normal fashion through {{c|emerge --update @world}}. Special attention should be given when Funtoo Linux is installed onto ZFS: that is root (/) resides in a storage pool. Important '''additional steps''' are recommended. Rebuilding of initramfs is a necessary step, which will include newer binaries of ZFS userland that providing new features. Explained below in details. | ||
<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}}. | ||
{{console|body= | |||
# emerge --update @world | |||
# genkernel initramfs --no-clean --no-mountboot --makeopts=-j${cpu-number+1} --kernel-config=/usr/src/linux/.config --zfs | |||
}} | |||
{{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.}} | {{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=== | ===Funtoo installed on ZFS=== | ||
{{ | Following updates to ZFS packages, the '''initramfs''' responsible for importing and mounting root (/) should be '''updated prior to rebooting'''. By having an initramfs with the same (version) ZFS executables ({{c|zpool}}, {{c|zfs}}) as found in {{f|/sbin}}, the likelihood of a boot failure is reduced. | ||
Do note that updating initramfs may also require the updating of bootloader or UEFI configuration as well. | |||
==== | ====...with GRUB==== | ||
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]]. | |||
Old versions of GRUB may not be able to re-import your root pool if the new ZFS features have been enabled. To reduce the likelihood of boot failure, GRUB should also be updated together with initramfs before enabling new storage pool features. | |||
Updating from old versions of ZFS (0.6.3 or older) will introduce new storage pool features. After updating ZFS, a review of the pool status will indicate that new features are available. | |||
{{console|body= | {{console|body= | ||
Line 41: | Line 33: | ||
the pool may no longer be accessible by software that does not support | the pool may no longer be accessible by software that does not support | ||
the features. See zpool-features(5) for details. | 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 | |||
}} | |||
'''The recommended steps to take before enabling new storage pool features are:''' | |||
# For now, ignore the option to upgrade the storage pool {{C|rpool}}. | |||
# Update your initramfs to include the latest ZFS binary executables. | |||
# If possible upgrade {{Package|sys-boot/grub}} to the latest version (2.02beta3). This version is known to support all latest ZFS features. Follow [[Install]] for GRUB installation instructions, '''including''' {{c|grub-install}}. | |||
# Confirm that your system reboots successfully. That is, mounting the root pool {{c|rpool}}. | |||
# (Optional) Upgrade your storage pool to enable new features. | |||
====Updating Storage Pool Features==== | |||
Without specifying a pool name the command {{c|zpool upgrade}} will indicate pools available for upgrade. | |||
{{console|body= | |||
###i## 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 | |||
}} | |||
Updating initramfs and rebooting as described earlier. To enable all new storage pool features on {{c|rpool}}, issue the following command. | |||
{{console|body= | |||
###i## 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 | |||
}} | |||
The previous 'status' and 'action' messages will disappear. | |||
{{console|body= | |||
###i## zpool status | |||
pool: rpool | |||
state: ONLINE | |||
scan: none requested | scan: none requested | ||
config: | config: |
Latest revision as of 16:55, October 15, 2016
Newer versions of ZFS resolve bugs, add 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
. Special attention should be given when Funtoo Linux is installed onto ZFS: that is root (/) resides in a storage pool. Important additional steps are recommended. Rebuilding of initramfs is a necessary step, which will include newer binaries of ZFS userland that providing new features. Explained below in details.
* The ZFS ebuilds are sys-fs/zfs
, sys-fs/zfs-kmod
and sys-kernel/spl
.
root # emerge --update @world root # genkernel initramfs --no-clean --no-mountboot --makeopts=-j${cpu-number+1} --kernel-config=/usr/src/linux/.config --zfs
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
Following updates to ZFS packages, the initramfs responsible for importing and mounting root (/) should be updated prior to rebooting. By having an initramfs with the same (version) ZFS executables (zpool
, zfs
) as found in /sbin
, the likelihood of a boot failure is reduced.
Do note that updating initramfs may also require the updating of bootloader or UEFI configuration as well.
...with GRUB
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.
Old versions of GRUB may not be able to re-import your root pool if the new ZFS features have been enabled. To reduce the likelihood of boot failure, GRUB should also be updated together with initramfs before enabling new storage pool features.
Updating from old versions of ZFS (0.6.3 or older) will introduce new storage pool features. After updating ZFS, a review of the pool status will indicate that new features are available.
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
The recommended steps to take before enabling new storage pool features are:
- For now, ignore the option to upgrade the storage pool
rpool
. - Update your initramfs to include the latest ZFS binary executables.
- If possible upgrade No results to the latest version (2.02beta3). This version is known to support all latest ZFS features. Follow Install for GRUB installation instructions, including
grub-install
. - Confirm that your system reboots successfully. That is, mounting the root pool
rpool
. - (Optional) Upgrade your storage pool to enable new features.
Updating Storage Pool Features
Without specifying a pool name the command zpool upgrade
will indicate pools available for upgrade.
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
Updating initramfs and rebooting as described earlier. To enable all new storage pool features on rpool
, issue the following command.
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
The previous 'status' and 'action' messages will disappear.
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