Skip to content

Commit 2aafc2e

Browse files
Umer Saleembehlendorf
authored andcommitted
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 <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Umer Saleem <[email protected]> Closes #13873 Closes #15261 Closes #15909
1 parent aeb79f2 commit 2aafc2e

File tree

4 files changed

+54
-4
lines changed

4 files changed

+54
-4
lines changed

cmd/zpool/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ dist_zpoolcompat_DATA = \
140140
%D%/compatibility.d/freebsd-11.2 \
141141
%D%/compatibility.d/freebsd-11.3 \
142142
%D%/compatibility.d/freenas-9.10.2 \
143-
%D%/compatibility.d/grub2 \
143+
%D%/compatibility.d/grub2-2.06 \
144+
%D%/compatibility.d/grub2-2.12 \
144145
%D%/compatibility.d/openzfs-2.0-freebsd \
145146
%D%/compatibility.d/openzfs-2.0-linux \
146147
%D%/compatibility.d/openzfs-2.1-freebsd \
@@ -171,6 +172,7 @@ zpoolcompatlinks = \
171172
"freebsd-11.3 freebsd-12.2" \
172173
"freebsd-11.3 freebsd-12.3" \
173174
"freebsd-11.3 freebsd-12.4" \
175+
"grub2-2.12 grub2" \
174176
"openzfs-2.1-freebsd freebsd-13.0" \
175177
"openzfs-2.1-freebsd freebsd-13.1" \
176178
"openzfs-2.1-freebsd freebsd-13.2" \

cmd/zpool/compatibility.d/grub2-2.06

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Features which are supported by GRUB2 versions prior to v2.12.
2+
#
3+
# GRUB is not able to detect ZFS pool if snaphsot of top level boot pool
4+
# is created. This issue is observed with GRUB versions before v2.12 if
5+
# extensible_dataset feature is enabled on ZFS boot pool.
6+
#
7+
# This file lists all read-only comaptible features except
8+
# extensible_dataset and any other feature that depends on it.
9+
#
10+
allocation_classes
11+
async_destroy
12+
block_cloning
13+
device_rebuild
14+
embedded_data
15+
empty_bpobj
16+
enabled_txg
17+
hole_birth
18+
log_spacemap
19+
lz4_compress
20+
resilver_defer
21+
spacemap_histogram
22+
spacemap_v2
23+
zpool_checkpoint

cmd/zpool/compatibility.d/grub2 renamed to cmd/zpool/compatibility.d/grub2-2.12

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Features which are supported by GRUB2
1+
# Features which are supported by GRUB2 versions from v2.12 onwards.
22
allocation_classes
33
async_destroy
44
block_cloning

man/man7/zpool-features.7

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ to the end of the line is ignored.
219219
.Sy Example :
220220
.Bd -literal -compact -offset 4n
221221
.No example# Nm cat Pa /usr/share/zfs/compatibility.d/grub2
222-
# Features which are supported by GRUB2
222+
# Features which are supported by GRUB2 versions from v2.12 onwards.
223223
allocation_classes
224224
async_destroy
225225
block_cloning
@@ -243,6 +243,31 @@ userobj_accounting
243243
zilsaxattr
244244
zpool_checkpoint
245245

246+
.No example# Nm cat Pa /usr/share/zfs/compatibility.d/grub2-2.06
247+
# Features which are supported by GRUB2 versions prior to v2.12.
248+
#
249+
# GRUB is not able to detect ZFS pool if snaphsot of top level boot pool
250+
# is created. This issue is observed with GRUB versions before v2.12 if
251+
# extensible_dataset feature is enabled on ZFS boot pool.
252+
#
253+
# This file lists all read-only comaptible features except
254+
# extensible_dataset and any other feature that depends on it.
255+
#
256+
allocation_classes
257+
async_destroy
258+
block_cloning
259+
device_rebuild
260+
embedded_data
261+
empty_bpobj
262+
enabled_txg
263+
hole_birth
264+
log_spacemap
265+
lz4_compress
266+
resilver_defer
267+
spacemap_histogram
268+
spacemap_v2
269+
zpool_checkpoint
270+
246271
.No example# Nm zpool Cm create Fl o Sy compatibility Ns = Ns Ar grub2 Ar bootpool Ar vdev
247272
.Ed
248273
.Pp
@@ -681,7 +706,7 @@ are destroyed.
681706
Large dnodes allow more data to be stored in the bonus buffer,
682707
thus potentially improving performance by avoiding the use of spill blocks.
683708
.
684-
.feature com.delphix livelist yes
709+
.feature com.delphix livelist yes extensible_dataset
685710
This feature allows clones to be deleted faster than the traditional method
686711
when a large number of random/sparse writes have been made to the clone.
687712
All blocks allocated and freed after a clone is created are tracked by the

0 commit comments

Comments
 (0)