[pve-devel] [PATCH proxmox-backup 1/1] restore-daemon: adapt to zpool output changes in 2.3

Stoiko Ivanov s.ivanov at proxmox.com
Mon Jun 2 11:47:56 CEST 2025


the output of `zpool import` has changed, thus our current parser
failed to find a zpool with zfs userspace in version 2.3.2.

While ZFS 2.3 introduced JSON output for many commands `zpool import`
still lacks the option [0], thus I'd postpone this adapation once all
needed zfs/zpool commands provide JSON.

the change was probably introduced in zfs upstream commit:
5137c132a ("zpool import output is not formated properly.")

[0] https://github.com/openzfs/zfs/issues/17084
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 proxmox-restore-daemon/src/proxmox_restore_daemon/disk.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxmox-restore-daemon/src/proxmox_restore_daemon/disk.rs b/proxmox-restore-daemon/src/proxmox_restore_daemon/disk.rs
index 50fbf315..e068ab9b 100644
--- a/proxmox-restore-daemon/src/proxmox_restore_daemon/disk.rs
+++ b/proxmox-restore-daemon/src/proxmox_restore_daemon/disk.rs
@@ -17,7 +17,7 @@ use pbs_api_types::BLOCKDEVICE_NAME_REGEX;
 
 const_regex! {
     VIRTIO_PART_REGEX = r"^vd[a-z]+(\d+)$";
-    ZPOOL_POOL_NAME_REGEX = r"^ {3}pool: (.*)$";
+    ZPOOL_POOL_NAME_REGEX = r"^ {2,3}pool: (.*)$";
     ZPOOL_IMPORT_DISK_REGEX = r"^\t {2,4}(vd[a-z]+(?:\d+)?)\s+ONLINE$";
 }
 
-- 
2.39.5





More information about the pve-devel mailing list