-
Notifications
You must be signed in to change notification settings - Fork 41
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
feat: add zfs-scrub systemd units #146
Conversation
This is great! Thank you! Somehow I completely missed your PR submissions until last night when I was too tired to respond.
I think the unit files look great with excellent use of Conditions. Regarding the best way to conditionally add the unit files... while in-unit Conditions are good, I agree it would be best to not include them unless on a ZFS image. I think the "best" way would be to start building a Thoughts on this approach? |
I like the use of the monotonic timer units |
I think the approach is great! It's what I was looking for but couldn't find it, hence this solution. But I don't personally have enough time/expertise to build this. If the base is built, then I'm happy to put a PR onto it with these timers. |
I'm working on a base and I'll let you know when it's ready for you to PR the timers. |
@Eelviny I want to apologize for completely dropping the ball on getting a framework setup for packaging this PR in an RPM. Things have shifted a bit at this point. I'd like to just get this added now, and if we can move to an RPM at sometime, that'll be a nice to have. All said, I've been doing some local testing by manually copying in the timer and service units to one of my systems. I do think there's a problem. I have a zpool called
I enabled a weekly scrub timer for it:
we can check the timer status to see the service unit to run
and i'll manually run the service as a test:
So it looks like the
I'm curious if you've moved forward using this on your own and if you have an improvement to add here? Thanks! |
Ah good spot, yes I had already found this and applied a fix to my own machine, but forgot to bring it back into the PR, apologies for that. I'm not god-tier experienced with systemd so I wasn't sure how to fix that exact issue, but I figured that since we're in full control of the system here and where the binaries are located, hardcoding the binary location won't be as much of an issue. Lmk your opinion on that. All I can say is, the above fix works on my machine |
I'm good with this. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Thank you.
Add zfs scrub systemd units to ucore to allow for easy configuration of periodic scrubbing of zpools.
I don't see any easy way to only have these unit files available for
-zfs
images only, however the main [email protected] has a condition check in it to ensure it can't run if ZFS is not installed.