-
Notifications
You must be signed in to change notification settings - Fork 291
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
syncoid: systemd.unit + debian #886
base: master
Are you sure you want to change the base?
Conversation
@phreaker0 are you a systemd person? I don't ever use systemd timers, so I don't feel entirely comfortable dogfooding this one. But if we can get a couple independent confirmations that it's good, seems like it would be a nice thing to go ahead and merge. |
So I'm just getting started using sanoid, and saw this PR so I thought I should give it a go. # TZ=UTC sanoid --take-snapshots --verbose
FATAL: cannot load /etc/sanoid/sanoid.defaults.conf - please restore a clean copy, this is not a user-editable file! at /usr/sbin/sanoid line 880. I can see that this PR installs the sanoid.defaults.conf file under Doing allows the command to finish successfully. Moving on to configure syncoid I look for a syncoid.conf file, but I cannot find one in neither And finally, I wanted to enable the systemd services. I'm not terribly familiar with systemd yet, but shouldn't one be expected to find the services listed by this command? # systemctl list-units --all | grep -E '(sanoid|syncoid)'
# Forgive any misconceptions on my part, I'm not terribly proficient with systemd, to say the least. Thank you for working on this! EDIT: also, the |
@bjodah this PR removes the install of /etc/sanoid, I don't know why and it obviously breaks stuff. You can use the latest master/release version to build your deb. @crpb IMHO there shouldn't be a shipped system service/timer for syncoid, as replication will in most cases be more specific which can't be covered by a single src/target setup. I for example have serveral replication timers/services for may different pools and hosts. Furthermore replication shouldn't be tied to sanoid-prune by default. |
thats because i took a few parts from the package in debian. the config isn't shipped by default and is only mentioned in the README.Debian. and i didn't realize that removing it from rules will do that 🙃
yeah, it was a first trial. also see those remarks which would probably end in a much more complex thing.
with my first tests i had a timer like in the example running but wasn't 100% if that could messy if both sanoid and syncoid start on the same time so i later hooked it to sanoid-prune which, for my simple replicationscheme, works so far.
|
Hi,
as i was writing a systemd.service/time because in the 'Issues' people only said they created them but didn't share anything about it and so i began to try out a couple few things how this could be realized in a good way.
Well, it isn't finished, or rather not what it could be, but at least it works for a simple one-to-one synchronization for now.
And in that process as i'm using Debian and wanted to build/install to check if that works as expected i also did a bit of work in the debian-folder. Tho i haven't upgraded the Packaing-Version or format. But at least i could remove all those directives in the debian/rules
I think log's say more than a thousand words 🙈
The manpages were created with. Maybe this could be done with a Makefile instead?
syncoid.service
will only work with a existant/etc/sanoid/syncoid.conf
but will not spew out any errors if it isn't configured.syncoid.conf
has a bunch of comments on how and why i did it like that.i wondered while i was trying out some things if it wouldn't be better to have
syncoid
parse an actual configfile like sanoid does which will also allow non-systemd users to make use of it? 🙊PS: i suppose this can PR can be worked on a while as i'm not totaly happy with it but maybe someone else has a good idea and thats why i stopped here for now 🙉
Cheers