From 2aafc2ea1f887458fe84cf4e8042fb5891e176bf Mon Sep 17 00:00:00 2001 From: Umer Saleem Date: Fri, 20 Sep 2024 22:19:57 +0500 Subject: Add compatibility file for GRUB versions up to v2.06 GRUB is not able to detect ZFS pool if snaphsot of top level boot pool is created. This issue is observed with GRUB versions up to v2.06 if extensible_dataset feature is enabled on ZFS boot pool. compatibility=grub2-2.06 would enable all read-only compatible zpool features except extensible_dataset and other features that depend on it. The existing grub2 compatibility file is now renamed to grub2-2.12 to reflect the appropriate grub2 version. grub2-2.12 lists all read-only features that can be enabled on boot pool for grub2 with version 2.12 onwards. A new symlink grub2 is created that currently points to the grub2-2.12 compatibility file. Reviewed-by: Brian Behlendorf Reviewed-by: Alexander Motin Signed-off-by: Umer Saleem Closes #13873 Closes #15261 Closes #15909 --- cmd/zpool/Makefile.am | 4 +++- cmd/zpool/compatibility.d/grub2 | 23 ----------------------- cmd/zpool/compatibility.d/grub2-2.06 | 23 +++++++++++++++++++++++ cmd/zpool/compatibility.d/grub2-2.12 | 23 +++++++++++++++++++++++ 4 files changed, 49 insertions(+), 24 deletions(-) delete mode 100644 cmd/zpool/compatibility.d/grub2 create mode 100644 cmd/zpool/compatibility.d/grub2-2.06 create mode 100644 cmd/zpool/compatibility.d/grub2-2.12 (limited to 'cmd') diff --git a/cmd/zpool/Makefile.am b/cmd/zpool/Makefile.am index d08b8e179..8a218d365 100644 --- a/cmd/zpool/Makefile.am +++ b/cmd/zpool/Makefile.am @@ -140,7 +140,8 @@ dist_zpoolcompat_DATA = \ %D%/compatibility.d/freebsd-11.2 \ %D%/compatibility.d/freebsd-11.3 \ %D%/compatibility.d/freenas-9.10.2 \ - %D%/compatibility.d/grub2 \ + %D%/compatibility.d/grub2-2.06 \ + %D%/compatibility.d/grub2-2.12 \ %D%/compatibility.d/openzfs-2.0-freebsd \ %D%/compatibility.d/openzfs-2.0-linux \ %D%/compatibility.d/openzfs-2.1-freebsd \ @@ -171,6 +172,7 @@ zpoolcompatlinks = \ "freebsd-11.3 freebsd-12.2" \ "freebsd-11.3 freebsd-12.3" \ "freebsd-11.3 freebsd-12.4" \ + "grub2-2.12 grub2" \ "openzfs-2.1-freebsd freebsd-13.0" \ "openzfs-2.1-freebsd freebsd-13.1" \ "openzfs-2.1-freebsd freebsd-13.2" \ diff --git a/cmd/zpool/compatibility.d/grub2 b/cmd/zpool/compatibility.d/grub2 deleted file mode 100644 index 6d60e6435..000000000 --- a/cmd/zpool/compatibility.d/grub2 +++ /dev/null @@ -1,23 +0,0 @@ -# Features which are supported by GRUB2 -allocation_classes -async_destroy -block_cloning -bookmarks -device_rebuild -embedded_data -empty_bpobj -enabled_txg -extensible_dataset -filesystem_limits -hole_birth -large_blocks -livelist -log_spacemap -lz4_compress -project_quota -resilver_defer -spacemap_histogram -spacemap_v2 -userobj_accounting -zilsaxattr -zpool_checkpoint diff --git a/cmd/zpool/compatibility.d/grub2-2.06 b/cmd/zpool/compatibility.d/grub2-2.06 new file mode 100644 index 000000000..ea7468dbc --- /dev/null +++ b/cmd/zpool/compatibility.d/grub2-2.06 @@ -0,0 +1,23 @@ +# Features which are supported by GRUB2 versions prior to v2.12. +# +# GRUB is not able to detect ZFS pool if snaphsot of top level boot pool +# is created. This issue is observed with GRUB versions before v2.12 if +# extensible_dataset feature is enabled on ZFS boot pool. +# +# This file lists all read-only comaptible features except +# extensible_dataset and any other feature that depends on it. +# +allocation_classes +async_destroy +block_cloning +device_rebuild +embedded_data +empty_bpobj +enabled_txg +hole_birth +log_spacemap +lz4_compress +resilver_defer +spacemap_histogram +spacemap_v2 +zpool_checkpoint diff --git a/cmd/zpool/compatibility.d/grub2-2.12 b/cmd/zpool/compatibility.d/grub2-2.12 new file mode 100644 index 000000000..86cce6338 --- /dev/null +++ b/cmd/zpool/compatibility.d/grub2-2.12 @@ -0,0 +1,23 @@ +# Features which are supported by GRUB2 versions from v2.12 onwards. +allocation_classes +async_destroy +block_cloning +bookmarks +device_rebuild +embedded_data +empty_bpobj +enabled_txg +extensible_dataset +filesystem_limits +hole_birth +large_blocks +livelist +log_spacemap +lz4_compress +project_quota +resilver_defer +spacemap_histogram +spacemap_v2 +userobj_accounting +zilsaxattr +zpool_checkpoint -- cgit v1.2.3