ublue-os / ucore

An OCI base image of Fedora CoreOS with batteries included
https://projectucore.io
Apache License 2.0
115 stars 23 forks source link

feat: add zfs-scrub systemd units #146

Open Eelviny opened 3 months ago

Eelviny commented 3 months ago

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 zfs-scrub@.service has a condition check in it to ensure it can't run if ZFS is not installed.

bsherman commented 2 months ago

Add zfs scrub systemd units to ucore to allow for easy configuration of periodic scrubbing of zpools.

This is great! Thank you! Somehow I completely missed your PR submissions until last night when I was too tired to respond.

I don't see any easy way to only have these unit files available for -zfs images only, however the main zfs-scrub@.service has a condition check in it to ensure it can't run if ZFS is not installed.

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 ublue-os-ucore-zfs RPM like the ublue-os-ucore-nvidia RPM built in the ucore-kmods repo. That RPM would only be installed with the other zfs RPMs as you can see in install-ucore.sh.

Thoughts on this approach?

dylanmtaylor commented 2 months ago

I like the use of the monotonic timer units

Eelviny commented 2 months ago

I think the "best" way would be to start building a ublue-os-ucore-zfs RPM like the ublue-os-ucore-nvidia RPM built in the ucore-kmods repo. That RPM would only be installed with the other zfs RPMs as you can see in install-ucore.sh.

Thoughts on this approach?

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.

bsherman commented 2 months ago

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.