I run SnapRAID on Nixos, and I just noticed that snapraid has been throwing errors in my logs. It's been broken ever since bb3aae2, which introduced a hardcoded list of paths where it looks for the smartctl binary.
The problem on NixOS is that the actual location is only to be found in the nix store. The NixOS package for this does make smartctl available on the PATH as seen here, which stopped working when a hardcoded list of locations was introduced. If the commit message is to be taken at face value, perhaps it could only look for the hardcoded locations if a binary isn't found in PATH? Or maybe the other way?
For now on NixOS, I'm able to get snapraid to work by running it under a systemd service with a bind mount for smartctl like below.
BindReadOnlyPaths = [
"${pkgs.smartmontools}/bin/smartctl:/usr/bin/smartctl"
];
This however only works for a systemd service, and cannot work when running the binary as either `root or via sudo.
I run SnapRAID on Nixos, and I just noticed that snapraid has been throwing errors in my logs. It's been broken ever since bb3aae2, which introduced a hardcoded list of paths where it looks for the
smartctlbinary.The problem on NixOS is that the actual location is only to be found in the nix store. The NixOS package for this does make smartctl available on the PATH as seen here, which stopped working when a hardcoded list of locations was introduced. If the commit message is to be taken at face value, perhaps it could only look for the hardcoded locations if a binary isn't found in
PATH? Or maybe the other way?For now on NixOS, I'm able to get snapraid to work by running it under a systemd service with a bind mount for
smartctllike below.This however only works for a systemd service, and cannot work when running the binary as either `root or via sudo.