zfs:Always import from /dev/disk/by-id

This commit is contained in:
Svein Ove Aas 2015-12-12 20:32:38 +00:00
parent 6a4b71afa5
commit 7e86e9a048

View File

@ -214,7 +214,7 @@ in
done done
''] ++ (map (pool: '' ''] ++ (map (pool: ''
echo "importing root ZFS pool \"${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)); '') rootPools));
}; };
@ -255,7 +255,7 @@ in
}; };
script = '' script = ''
zpool_cmd="${zfsUserPkg}/sbin/zpool" 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) // { in listToAttrs (map createImportService dataPools) // {