Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/sata: support SATA drive timeouts #33095

Merged
merged 1 commit into from Mar 31, 2021
Merged

Conversation

peterhoeg
Copy link
Member

Motivation for this change

SATA tries support setting a timeout value to avoid a software RAID crapping out completely in case of failure. I've been running with this enabled for 6 months but as I haven't had any dying disks I don't know if it actually does what I think it does...

Cc: @kevlar1818

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@bjornfor
Copy link
Contributor

Isn't there many more settings like these that can be configured for a drive (e.g. hdparm)? I'm not sure it belongs in the services.smartd namespace. To me that namespace is for monitoring ("read only").

@bjornfor bjornfor changed the title smartd: support drive timeouts nixos/smartd: support drive timeouts Dec 27, 2017
@bjornfor
Copy link
Contributor

Please prefix commits to nixos with "nixos/".

@peterhoeg
Copy link
Member Author

I'm not sure it belongs in the services.smartd namespace.

That's an excellent point. It should be under hardware instead. I'll take a look.

@mmahut
Copy link
Member

mmahut commented Aug 3, 2019

What is the status of this pull request?

@peterhoeg
Copy link
Member Author

It needs to move to hardware. Haven't done it yet.

@stale
Copy link

stale bot commented Jun 1, 2020

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 1, 2020
@peterhoeg
Copy link
Member Author

Still an issue.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 8, 2020
@peterhoeg peterhoeg changed the title nixos/smartd: support drive timeouts [WIP] nixos/smartd: support drive timeouts Aug 24, 2020
@ryantm ryantm marked this pull request as draft October 23, 2020 03:14
@peterhoeg peterhoeg changed the title [WIP] nixos/smartd: support drive timeouts nixos/sata: support SATA drive timeouts Jan 31, 2021
@peterhoeg peterhoeg marked this pull request as ready for review January 31, 2021 06:36
@peterhoeg
Copy link
Member Author

Use udev to toggle things to ensure a hotswapped drive is configured as well.

@peterhoeg
Copy link
Member Author

Cc'ing people who previously expressed interest: @felschr @kevin-hanselman

@peterhoeg
Copy link
Member Author

If nobody has any issues with this, I'll be merging it this weekend.

@bb2020
Copy link
Member

bb2020 commented Feb 22, 2021

Isn't it better to have hardware.sata.timeout.enabled toggle? Having -1 as disable seems confusing and out of convention.

@peterhoeg
Copy link
Member Author

enable added as requested.

@peterhoeg peterhoeg merged commit f533440 into NixOS:master Mar 31, 2021
@peterhoeg peterhoeg deleted the m/smartd branch March 31, 2021 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants