Skip to content

Commit 1040cfb

Browse files
author
Umer Saleem
committed
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 lists all read-only features that can be enabled on boot pool for grub with version 2.12 onwards. Signed-off-by: Umer Saleem <[email protected]>
1 parent 8f2f6cd commit 1040cfb

File tree

5 files changed

+54
-6
lines changed

5 files changed

+54
-6
lines changed

cmd/zpool/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ dist_zpoolcompat_DATA = \
141141
%D%/compatibility.d/freebsd-11.3 \
142142
%D%/compatibility.d/freenas-9.10.2 \
143143
%D%/compatibility.d/grub2 \
144+
%D%/compatibility.d/grub2-2.06 \
144145
%D%/compatibility.d/openzfs-2.0-freebsd \
145146
%D%/compatibility.d/openzfs-2.0-linux \
146147
%D%/compatibility.d/openzfs-2.1-freebsd \

cmd/zpool/compatibility.d/grub2

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

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

man/man7/zpool-features.7

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

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

tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create.shlib

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,8 @@ function check_feature_set
119119
while read line; do
120120
typeset flag=1
121121

122-
if [[ "$line" == "#*" ]]; then
123-
continue
124-
fi
122+
# Skip comments
123+
[[ $line = \#* ]] && continue
125124

126125
for set in "$@"; do
127126
if ! grep -q "$line" $ZPOOL_COMPAT_DIR/$set; then

0 commit comments

Comments
 (0)