You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
zpool-trim.service attempts to trim pools regardless of them being trimmable or not and whether a pool is currently being trimmed or not. This has several problems. I will herby refer to the two types as HDD (non-trimmable) and SSD (trimmable) for short.
If the system contains both HDD pools and SSD pools and a HDD pool is listed before all SSD pools in "zpool list", the service will abort after the first HDD pool is hit and the SSD pools will never be trimmed.
If the system contains only SSD pools the trim of all SSD pools may still fail if one SSD pool is currently being trimmed. Issuing the trim command to a pool already being trimmed will fail and the service will abort before issuing the trim command to all SSD pools.
If the system contains only HDD pools the service which is now enabled by default in NixOS 20.03 will now periodically fail, putting the entire system in a degraded systemd state. This is a NixOS 20.03 regression.
To Reproduce
Steps to reproduce the behavior:
Recreate any of the scenarios described above. All errors return 255 and can be simulated by replacing a pool name with a non-existent pool name, which also returns 255.
Expected behavior
Either:
zpool-trim.service should trim all SSD pools and should not degrade the system by default. This could be implemented by having zpool-trim.service ignore the exit code of every "zpool trim " command it issues.
zpool-trim.service should be disabled by default and it be documented that it only support systems containing exclusively SSD pools.
Metadata
system: "x86_64-linux"
host os: Linux 5.4.23, NixOS, 20.03.git.893d745d5a0 (Markhor)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.3.2
Maintainer information:
# a list of nixpkgs attributes affected by the problemattribute:
# a list of nixos modules affected by the problemmodule:
- nixos/modules/tasks/filesystems/zfs.nix
The text was updated successfully, but these errors were encountered:
yesbox
changed the title
zpool-trim.service fails on in many scenarios by default
zpool-trim.service fails by default in many scenarios
Mar 3, 2020
yesbox
changed the title
zpool-trim.service fails by default in many scenarios
zpool-trim.service fails by default in NixOS 20.03 in many scenarios
Mar 3, 2020
Describe the bug
zpool-trim.service attempts to trim pools regardless of them being trimmable or not and whether a pool is currently being trimmed or not. This has several problems. I will herby refer to the two types as HDD (non-trimmable) and SSD (trimmable) for short.
If the system contains both HDD pools and SSD pools and a HDD pool is listed before all SSD pools in "zpool list", the service will abort after the first HDD pool is hit and the SSD pools will never be trimmed.
If the system contains only SSD pools the trim of all SSD pools may still fail if one SSD pool is currently being trimmed. Issuing the trim command to a pool already being trimmed will fail and the service will abort before issuing the trim command to all SSD pools.
If the system contains only HDD pools the service which is now enabled by default in NixOS 20.03 will now periodically fail, putting the entire system in a degraded systemd state. This is a NixOS 20.03 regression.
To Reproduce
Steps to reproduce the behavior:
Recreate any of the scenarios described above. All errors return 255 and can be simulated by replacing a pool name with a non-existent pool name, which also returns 255.
Expected behavior
Either:
Metadata
"x86_64-linux"
Linux 5.4.23, NixOS, 20.03.git.893d745d5a0 (Markhor)
yes
yes
nix-env (Nix) 2.3.2
Maintainer information:
The text was updated successfully, but these errors were encountered: