diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index 675bd3d232a6..dedd3f5ca451 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -214,7 +214,7 @@ in done ''] ++ (map (pool: '' echo "importing root ZFS pool \"${pool}\"..." - zpool import -N $ZFS_FORCE "${pool}" + zpool import -d /dev/disk/by-id -N $ZFS_FORCE "${pool}" '') rootPools)); }; @@ -255,7 +255,7 @@ in }; script = '' zpool_cmd="${zfsUserPkg}/sbin/zpool" - ("$zpool_cmd" list "${pool}" >/dev/null) || "$zpool_cmd" import -N ${optionalString cfgZfs.forceImportAll "-f"} "${pool}" + ("$zpool_cmd" list "${pool}" >/dev/null) || "$zpool_cmd" import -d /dev/disk/by-id -N ${optionalString cfgZfs.forceImportAll "-f"} "${pool}" ''; }; in listToAttrs (map createImportService dataPools) // {