Add -d option to bpool import to prevent import from ZVOL devices (e.g. /dev/zd*) with bpool datasets

This commit is contained in:
Maarten den Braber
2021-07-08 02:27:17 +02:00
parent 164456055c
commit f4b9479585

View File

@@ -734,7 +734,7 @@ Before=zfs-import-cache.service
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/bin/sh -c '[ -f /etc/zfs/zpool.cache ] && mv /etc/zfs/zpool.cache /etc/zfs/preboot_zpool.cache || true'
ExecStart=/sbin/zpool import -N -o cachefile=none $v_bpool_name
ExecStart=/sbin/zpool import -N -o cachefile=none -d /dev/disk/by-id $v_bpool_name
ExecStartPost=/bin/sh -c '[ -f /etc/zfs/preboot_zpool.cache ] && mv /etc/zfs/preboot_zpool.cache /etc/zfs/zpool.cache || true'
[Install]