Zfsutils-Linux: "zvol_wait" script shows error with encrypted volumes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zfs-linux (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
We are currently encounter an issue in the zfsutils-package with encrypted zvols.
The service zfs-volume-wait throws the following error message:
"Apr 22 13:08:19 test1 zvol_wait[806]: cannot open 'rpool/
How to reproduce the error:
1. zpool create main /dev/sdb
2. zfs create -o encryption=on -o keylocation=prompt -o keyformat=
3. reboot
4. systemctl status zfs-volume-wait
● zfs-volume-
Loaded: loaded (/lib/systemd/
Active: active (exited) since Fri 2022-04-22 13:08:19 UTC; 58s ago
Process: 758 ExecStart=
Main PID: 758 (code=exited, status=0/SUCCESS)
Apr 22 13:08:19 test1 systemd[1]: Starting Wait for ZFS Volume (zvol) links in /dev...
Apr 22 13:08:19 test1 zvol_wait[758]: Testing 1 zvol links
Apr 22 13:08:19 test1 zvol_wait[806]: cannot open 'rpool/
Apr 22 13:08:19 test1 zvol_wait[758]: All zvol links are now present.
Apr 22 13:08:19 test1 systemd[1]: Finished Wait for ZFS Volume (zvol) links in /dev.
zfs-volume-wait service calls /sbin/zvol_wait which is part of the package "zfsutils-linux".
Line 29, in script "zvol_wait" seems to be causing this error:
27 filter_
28 while read -r zvol; do
29 if ! [ "$(zfs list -H -o keystatus rpool/export/
30 echo "$zvol"
31 fi
32 done
33 }
It seems that this command does not respect the "zfs list" syntax, which should be
"zfs list [-r|-d depth] [-H] [-o property[,...]] [ -t type[,...]] [ -s property ] ... [ -S property ] ... [filesystem|
Bug was already reported here:
# https:/
# https:/
This fix is causing the issue:
# https:/
I created an git patch which fixes the issue:
--- zvol_wait 2022-04-21 19:09:21.572000000 +0000
+++ zvol_wait_new 2022-04-22 13:25:26.989422811 +0000
@@ -26,7 +26,7 @@
filter_
while read -r zvol; do
- if ! [ "$(zfs list -H -o keystatus rpool/export/
+ if ! [ "$(zfs list -H -o keystatus "$zvol")" = "unavailable" ]; then
echo "$zvol"
fi
done
After the patch was applied the command works fine:
root@test1:/sbin# zvol_wait_new
Testing 1 zvol links
All zvol links are now present.
Did i miss anything or is this really a bug?
Thank you for your help
Further information:
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Package: zfsutils-linux
Version: 0.8.3-1ubuntu12.13
Priority: extra
Section: admin
Source: zfs-linux
Origin: Ubuntu
Maintainer: Ubuntu Developers <email address hidden>
Original-
Bugs: https:/
Installed-Size: 1,297 kB
Provides: zfsutils
Depends: libnvpair1linux (= 0.8.3-1ubuntu12
Recommends: lsb-base, zfs-zed
Suggests: nfs-kernel-server, samba-common-bin (>= 3.0.23), zfs-initramfs | zfs-dracut
Conflicts: zfs, zfs-fuse
Breaks: openrc, spl (<< 0.7.9-2), spl-dkms (<< 0.8.0~rc1), zfs-dkms (<< 0.7.9-2)
Replaces: spl (<< 0.7.9-2), spl-dkms
Homepage: https:/
Task: ubuntu-live, xubuntu-live, ubuntustudio-
Phased-
Download-Size: 354 kB
APT-Manual-
APT-Sources: http://
Hi,
any updates on this?
thx