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

One initiator and multiple targets issue #258

Open
40417256 opened this issue Nov 16, 2023 · 3 comments
Open

One initiator and multiple targets issue #258

40417256 opened this issue Nov 16, 2023 · 3 comments
Labels

Comments

@40417256
Copy link

I have one initiator replication one way to multiple targets.
I use systemd services (one for each target)

Touch a file on the initiator, the sync tasks kicks in but I get the following error in the log:

There is already a local instance [13020@sysvolsync-traytnkca03] of osync running for this replica. Cannot start.#033[0m

So the second server is not synced, is there something I am missing ? I thought since this is a one way operation from the initiator to ALL targets this would work in parallel or at the worst sequentially.

Thanks,

Eric

@deajan
Copy link
Owner

deajan commented Nov 17, 2023

osync cannot sync simultaneously multiple targets since initiator files will be modified while one sync operations is ongoing.
Best thing to do is to launch a batch on modification, ie osync-batch so initiator mods will trigger a full sync to all targets.

@40417256
Copy link
Author

Thanks for the input, but since I require all targets to be updated fairly soon after a modification on the initiator the cron task is not what I need.

What do you think of setting up inotifywait in a systemd service that will run osync-batch.sh ?

Have a great weekend,

Eric

@deajan
Copy link
Owner

deajan commented Nov 18, 2023

That's an ideal idea in your case.
Would require osync modification to launch osync-batch.sh instead of osync itself.

The corresponding lines in osync will be

		if [ "$ConfigFile" != "" ]; then
			osyncSubcmd='bash '$osync_cmd' "'$ConfigFile'" '$opts
		else
			osyncSubcmd='bash '$osync_cmd' '$opts
		fi

where osyncSubcmd would be replaced with bash /path/to/osync_batch.sh

Care to check this manually before I'm implementing this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants